Pandabot

June 5, 2022 ยท View on GitHub

This is the moderation bot for the official Ulraf Discord server.

Installation

Install GHC and cabal. Compile the project and its dependencies with cabal build and run with cabal run pandabot.

Note that there must be a bot.json configuration file in the working directory when you run the bot. It should look something like this:

{
  "botToken": "<token>",
  "welcomeRole":  "<snowflake>",
  "pointAssignEmoji": {
    "name": "๐Ÿ‘€"
  },
  "reactPositiveEmoji": {
    "name": "PandaBot",
    "id":  "<snowflake>"
  },
  "connectionString": "database.sqlite",
  "commandPrefix": "?",
  "voiceConfig": {
    "roles": [
      {
        "name": "SHECRET voice chat",
        "role":  "<snowflake>",
        "voiceChannels": [
           "<snowflake>"
        ],
        "textChannel":  "<snowflake>"
      },
      {
        "name": "the Bamboo Jungle",
        "role":  "<snowflake>",
        "voiceChannels": [
           "<snowflake>"
        ],
        "textChannel":  "<snowflake>"
      }
    ]
  }
}

Using a bot.yaml instead is also supported.