The SCE has a discord server where its members gather online. The purpose of this bot is to manage the Discord server with custom commands.
- Create a
config.jsonfile with the same format asconfig.example.json API_TOKENis the Discord API token (ask a team member for this)- In your terminal (in the root directory of the project) run
docker-compose up --build bot- Make sure Docker is running first
- Omit the
--buildflag to reuse an old build
- Test out the bot in the discord channel!
- Create a
config.jsonfile with the same format asconfig.example.jsonAPI_TOKENis the Discord API token (ask a team member for this)
- In your terminal (in the root directory of the project)
- run
npm install - run
npm start
- run
- Test out the bot in the discord channel!
To have the bot assign a role to a user when they react to a message, add
an entry to the REACTIONS object in config.json like below:
{
"REACTIONS": {
"MESSAGE_ID": {
"EMOJI": "ROLE_ID"
}
}
}For example, if we want to assign a role if a user reacts to a message with either 😂 or 👍, we would create an entry like below:
{
"REACTIONS": {
"1162195531150393364": {
"😂": "847528126207885383",
"👍": "622587142639714304"
}
}
}Note: The role will be removed if the user un-reacts to the message.
If we want to un-assign a role if a user reacts to a message and re-assign the role if the user un-reacts with 👍, we would create an entry like below:
{
"REACTIONS": {
"1162195531150393364": {
"👍": "622587142639714304",
"reverse": true
}
}
}We are currently using Dyno/Tatsumaki/Reactionrole/Owobot to manage our Discord server. This Discord bot will allow us to combine the functionalities of these four bots into one. It will also be tailored specifically towards the SCE discord server.
- src/
- api/
- test/
src/ contains all the commands and bot interface
api/ is used to connect to the website
test/ is used for testing