This is a sample Bot with some mod operation for course servers.
- !about : Sends a channel message with the GitHub repo url.
- !warning : Sends a channel message with a warning about pending channel cleanup.
- !kickall : Kicks out everyone in the channel.
- !clearall : Deletes the message history.
- Get a Discord Bot TOKEN
- Go to https://discord.com/developers/applications
- Create an Application (
New Application
)- Register the
CLIENT ID
- Register the
- Create a Bot (
Add Bot
on theBot
tab)- Get the secret TOKEN (
Click to Reveal Token
on the recently created Bot page)
- Get the secret TOKEN (
- Access the bot link at
https://discord.com/oauth2/authorize?client_id=CLIENT ID&scope=bot
- Setup the bot server
- Copy
.env.sample
to.env
- Replace the
TOKEN
with the secret TOKEN from the Bot page. - Install dependencies
npm i
- Run the server
node src/index.js
- Copy