Skip to content

Configuration

Sashank edited this page Nov 18, 2023 · 3 revisions

Configuration

Welcome to the Mod Mail Bot configuration guide! This guide will walk you through the necessary configurations to set up and customize your Mod Mail Bot.

Table of Contents

Configuration File (config.ini)

The config.ini file is the main configuration file for Mod Mail Bot. It contains various settings such as the bot token, command prefix, and more.

Example config.ini:

[Main]
token = YOUR_DISCORD_BOT_TOKEN
playing = Playing a Game
command_prefix = !

[AntiSpam]
messages = 5
seconds = 10

Make sure to replace YOUR_DISCORD_BOT_TOKEN with the actual token obtained from the Discord Developer Portal.

Database Schema (schema.sql)

The schema.sql file defines the structure of the SQLite database used by Mod Mail Bot. This file is used during the initial setup to create the necessary tables.

Example schema.sql:

-- schema.sql
CREATE TABLE ignored (
    user_id INTEGER PRIMARY KEY,
    quiet INTEGER,
    reason TEXT
);

Data File (modmail_data.sqlite)

The modmail_data.sqlite file is the SQLite database file where the bot stores data, including ignored users and other relevant information.

Environmental Variables

Some configurations, such as the bot token, can be set as environmental variables. Refer to the bot's code for details on which variables are supported.

Setting up on Discord Developer Portal

  1. Create a New Application:

  2. Get the Bot Token:

    • In the "Bot" tab, click on "Add Bot" to get the bot token.
  3. OAuth2 Setup:

    • In the "OAuth2" tab, under "OAuth2 URL Generator," select the "bot" scope and the necessary permissions.
    • Use the generated URL to invite the bot to your server.

That's it! You've successfully configured Mod Mail Bot. If you encounter issues, refer to the Troubleshooting section or open an issue on the GitHub Issues page.

Happy mod mailing!