Skip to content
This repository was archived by the owner on Jul 23, 2026. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SupportMail — v1 (archived)

The first version of the SupportMail Discord bot. It handles modmail via DM-to-forum tickets, message reports, per-guild blacklists, a premium/subscription tier, webhook-based logging, and localization in three languages.

This was my first real programming project — written while learning Python — and is published for display only. It no longer runs against current library versions and is not maintained. Superseded by v2, a full rewrite in TypeScript / discord.js.

Stack

  • Python 3.11, discord.py-based
  • aiosqlite — four separate SQLite databases (config, tickets, reports, logging)
  • gettext localization (en / de / fr), with a DeepL-backed translation feature
  • httpx, pytz, python-dateutil

Layout

Path What
main.py Entry point — cog loader, crash handler
ext/_1_tickets/ DM ↔ forum-post ticket handling, edits, interactions
ext/_2_reports/ Message-report creation and moderation actions
ext/_3_commands/ Slash commands (setup, team, blacklist, public, help, …)
ext/_4_misc/ Database setup, premium, data management
utils/sm_api.py Core bot logic (tickets, logging, premium, webhooks)
utils/translations.py gettext wrapper for i18n
utils/ (*.py) Models, enums, error types, shared helpers
Translations/ gettext .po sources per feature

Configuration

Copy the example config and fill in the keys:

cp config.example.json config.json
Key Purpose
DC_KEY1 Discord bot token (the token used to run)
DC_KEY Secondary Discord token
DEEPL_KEY DeepL API key (translation feature)
TOPGG_KEY Top.gg API key (stats posting)
CRASH_WEBHOOK Discord webhook URL for crash alerts (optional)

Running (historical)

  1. Fill in config.json (above).
  2. Provide the SQLite databases the code expects (not included).
  3. python main.py
Why DC_KEY1 and DC_KEY?

This was my first real project - I used to manually change the name of the bot token used to run the bot - one was for dev, one was for prod. I just changed the name of the key in the code when I was developing.

Note: secrets, databases, and runtime logs are intentionally excluded (see .gitignore). This repo is a code sample, not a deployable build.

About

The first version of the SupportMail Discord bot, written in early 2023.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages