This was created by Benjamin Thaw.
This bot can send messages to a user or in a channel whenever a command is executed.
- Make sure you have NodeJS installed.
- Download this repository into a folder on your computer or VM.
- Open terminal or command prompt, and change directories to the location of the folder (with
cd
). - Configure the bot under Initial Configuration
- Start the bot with
node bot.js
.
- Rename
config-ex.json
to `config.json. - Go to https://discordapp.com/developers/applications
- Sign in, click "New Application", and enter a name.
- Click "BOT" on the left menu, hit "Add Bot", and click "Yes, do it!".
- Under "Token", click "Copy".
- Replace
TOKEN_GOES_HERE
inconfig.json
with the token that you copied. - Enter the ID of the channel to send the message in (see here to learn how to obtain channel IDs). Check out the Customize section to change what the bot does.
You can choose whether to send a message in a specified channel, send a DM to another user, or send a message in a channel AND send a DM whenever a command is used.
By default, the bot will only send a message in the channel specified by "channelId"
.
You can have none, one, or both options enabled. To enable/disable one or more options, see below.
To enable:
- Open
config.json
. - Change the value of
"sendToChannel"
totrue
. - Change the value of
"channelIId"
to the channel ID (Note: not the channel name).
To disable:
- Open
config.json
. - Change the value of
"sendToChannel"
tofalse
.
To enable:
- Open
config.json
. - Change the value of
"dmToUser"
totrue
. - Change the value of
"userId"
to the User ID (Note: not the user's name/tag).
To disable:
- Open
config.json
. - Change the value of
"dmToUser"
tofalse
.