The easiest way to get started is to use a docker-compose
file, which includes all the needed services.
To start off:
- Copy
config-default.json
asconfig.json
- In the config file, configure:
- Your desired platform(s)
- Anything regarding bot behaviour: commands, chat modules, logging, ...
- Copy
docker-compose.example.yaml
asdocker-compose.yaml
- In the compose file, set up:
- Bot environment values, and the authentication info as needed (see below for specific platforms)
- Absolute path to the freshly created
./config.json
file (<path_to_supibot_repository>
) - Uncomment the
DEBUG_MODE
environment value for debugging
- Run Docker:
docker compose up
- For debugging:
- In your host machine's browser, navigate to
chrome://inspect
- Add
localhost:9229
- Open the console via
Remote Target → inspect
- In your host machine's browser, navigate to
- Create an application: guide on Twitch
- Note your
Client ID
andClient secret
tokens - Visit this website for token generation, pick "Custom Scope Token"
- Fill in the section
Use My Client Secret and Client ID
with the tokens from step 2 - Allow token scopes:
user:bot
user:read:chat
user:write:chat
to read and send messages (required)user:read:emotes
to fetch the bot's own emotes (suggested)user:manage:whispers
for whispers (private messages) functionality (suggested)channel:moderate
for moderation actions (optional)
- Generate the token, allow the Twitch authorization (make sure the account being authorized is your bot account!) and note the token
- Fill in the env values in the compose file accordingly:
TWITCH_CLIENT_ID
TWITCH_CLIENT_SECRET
TWITCH_REFRESH_TOKEN
- Create an application: Discord Developer Portal
- Navigate to
Application → Bot
- Note the
Token
(will only be available to copy once) andApplication ID
- Set up the
Privileged Gateway Intents
:Server members
andMessage content
- Fill in the
Application ID
into yourconfig.json
's discord platform, as theselfId
property - Fill in the env values in the compose file with your
Token
:DISCORD_BOT_TOKEN
Setting Supibot up locally requires several steps, and is much easier if done with an interactive script.
- Set up
MariaDB
of at least version10.2.0
and credentials. Ideally, create a user separate for Supibot that has permissions ondata
andchat_data
databases. - Set up
Redis
git clone
orfork
the repository- Run
yarn install
, depending on which package manager you use - Run
yarn run setup
and walk through the interactive setup script, making sure to set up at least one platform, one channel and the command prefix - Run
yarn start
, oryarn debug
for debug access
Alternatively, if run setup
does not work or for whatever other reason, follow this manual setup:
- Set up
MariaDB
of at least version10.2.0
+ credentials - Set up
Redis
git clone
orfork
the repository- Copy
.example.env
as.env
and fill out all relevant env variables, including authentication credentials - Run
yarn install
- Run
yarn run init-database
- Run
yarn start
to verify that the bot can start up correctly. If it does, it will not attempt to join any platforms or channels. In order to do so, continue: - Copy
config-default.json
asconfig.json
and fill out your custom configuration, especially regarding desired platforms - Set up at least one channel per platform to
chat_data.Channel
table, by inserting a new row, and filling the channel'sName
,Specific_ID
andPlatform
- Run the bot as in 7), or
yarn run debug
for debug access
In order to set yourself as the administrator
of Supibot:
- Make sure you have been seen by the bot - check the
chat_data.User_Alias
table, find your name, and note the user ID - Create a new row in the
chat_data.User_Alias_Data
table:
User_Alias
is the ID you notedProperty
isadministrator
Value
istrue
- Changes should apply immediately, in case they don't, restart the bot