This is a super-simple Discord Bot written in Node.JS and requires only two dependencies.
Self-hosted:
- Create a Bot on the Discord Developers website (guide here).
- Clone this repo in to a place you wish to host the Bot.
cd
in to the directory and runnpm install
- this will install all the required dependencies.- Edit the config file (mainly the
discordToken
anddiscordAlertChannel
values). - We're ready to go. Run the command
npm start
.
Hosted:
- Click the here to add the bot to your server.
- Done. That's literally it.
A break-down and explanation of what each value in the config file relates to.
discordToken: ''
- The Bot token provided by Discord.discordAlertChannel: ''
- The channel ID which the Bot will send the flood-monitor alerts to.discordCommand: '!slanriver'
- The command the Bot listens for, default is!slanriver
.riverHeight: 1.690
- The river height in metres at which flooding occurs (value provided by Gov.UK - not recommended to change).apiRequestInterval: 900000
- Interval between checks for a new river height reading (value provided by Gov.UK - not recommended to change).