A simple Discord bot for observing and restarting MojiraBot.
This bot has two functions:
- It adds the slash command
/mojirabotwhich allows helpers and moderators to stop and restart MojiraBot directly via Discord. - It checks whether MojiraBot is online in regular intervals, and if it is not, it restarts it automatically.
This behaviour can be toggled with the
/autorestartDiscord command.
This bot is written in Rust using the Serenity Discord API library.
For development, use the Rust build tool cargo.
- Run for development:
cargo run - Build for production:
cargo build --release
You need to create the file config.json containing the Discord bot secrets:
{
"token": "<your bot's discord token here>",
"app_id": "<your bot's app id here>"
}Everything for the bot to run via CI is included in the dbobs.sh script.