Discord bot for the !SilentCorner
Features are just modules and modules are functions.
Make sure your function is an arrow const function otherwise it won't get merged
Your function name should be in this format to keep the consistency module_*
An example of a module:
const module_fjla = (newMsg) => {
if (newMsg.content === '.') {
newMsg.react('🍆');
}
}
You can also add an event listener if you have a custom module.
An example of an event listener:
client.on("messageUpdate", (oldMsg, newMsg) => {
module_fjla(newMsg);
});
If you have no idea how to use the discord API, check this out: https://discordjs.guide/
Just to keep the consistency.
Yeah sure as long as all members of the !SC review and accept your PR.
Ya l mgheber...
touch .env
- Add these to your
.env
TOKEN="YOUR_BOT_TOKEN"
API_UID="42_API_UID"
API_SECRET="42_API_SECRET"
DEV=true
- Replace all those tokens with
!tokens
(only works in#bot-test
) cd ${workDirectory}
and thennpm run dev
- Add your modules
P.S: The bot will only listen to messages you send to #bot-test