A modular Discord bot framework for The Aakhri Station
Project description
๐ฅ Ember
Modular. Modern. Production-ready Discord bot framework.
Overview โข Cogs โข Quick Start โข Docker โข Extras โข Development โข Credits
Overview
Ember is a fully modular Discord bot built on discord.py 2.4+ and Components V2. Every feature is a self-contained cog โ enable or disable anything without touching the core. It ships with a real permissions framework, per-guild config, a central modlog, and a service-layer architecture that keeps business logic testable and clean.
Inspired by Red-DiscordBot's battle-tested patterns, built clean from scratch with modern Python and async-first design.
The default cog set includes:
- Moderation (warn, mute, ban, kick, modlog with case cards)
- Community tools (birthdays, AFK, booster roles, welcome messages, activity roles)
- Utility (temp voice channels, thread cleaner, custom commands, channel management)
- Fun (game pings, emoji stealer, general commands)
- Economy (bank, credits)
- Integrations (Twitch streams, GitHubโDiscord, DuckDNS, backups)
Extra plugins (privacy-sensitive features, shipped separately in Ember-extras):
- Confessions โ anonymous confession system with replies and mod tools
- ShadowChat โ anonymous gender-matched chat roulette with DM relay
Cogs
admin โ Bot management and configuration
| Cog | Description |
|---|---|
cleanup |
Bulk message deletion and channel pruning |
cog_manager |
Load, unload, and reload cogs at runtime |
dev |
Developer utilities and debug commands |
downloader |
Install cogs from external repositories |
permissions_mgr |
Fine-grained per-guild permission overrides |
settings |
Bot-wide and per-guild configuration panel |
community โ Engagement and social features
| Cog | Description |
|---|---|
activity_roles |
Auto-assign roles based on game activity |
afk |
AFK status with auto-mention suppression |
birthday |
Birthday tracking, announcements, and role assignment |
booster_roles |
Custom colour roles for server boosters |
promoter |
Self-promotion channel with cooldown management |
welcome |
Configurable welcome embeds and DMs for new members |
mod โ Moderation and logging
| Cog | Description |
|---|---|
moderation |
Warn, mute, kick, ban, softban with case tracking |
modlog |
Central moderation log with sequential case cards |
bot_logging |
Audit log mirroring and event logging |
branding |
Server branding enforcement and asset management |
filter |
Word/phrase filter with configurable actions |
reports |
User report system with staff escalation |
utility โ Quality-of-life tools
| Cog | Description |
|---|---|
channels |
Channel lock/unlock and management shortcuts |
customcom |
Custom slash commands with variable substitution |
dragme |
Move users between voice channels |
feedback |
Structured feedback collection with staff routing |
multi_lounge |
Multiple persistent lounge channels |
nick |
Server-wide nickname management |
rolementions |
Temporarily mentionable role toggle |
status |
Rotating bot status messages |
tempvc |
Dynamic temporary voice channel creation |
thread_cleaner |
Auto-archive or delete inactive threads |
fun โ Entertainment
| Cog | Description |
|---|---|
emoji_stealer |
Steal and add emojis from other servers |
game_ping |
Game-activity-based role ping system |
general |
Miscellaneous fun commands |
ping |
Latency check with gateway and API round-trip |
economy โ Virtual currency
| Cog | Description |
|---|---|
bank |
Virtual bank with credits, transfers, and leaderboard |
integrations โ External service connectors
| Cog | Description |
|---|---|
backups |
Automated database backups to Backblaze B2 |
duckdns |
DuckDNS IP updater for dynamic DNS |
reconnect |
Auto-reconnect watchdog for gateway drops |
streams |
Twitch live-stream alerts |
Quick Start
Prerequisites
- Python 3.11 or higher
- A Discord bot token โ create one at the Developer Portal
- Enable Message Content, Server Members, and Presence intents
Install
git clone https://github.com/guardiansofspartax/Ember.git
cd Ember
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
Edit .env โ at minimum, set BOT_TOKEN:
BOT_TOKEN=your_discord_bot_token_here
# Optional but recommended
OWNER_IDS=111111111111111111
GUILD_ID=123456789012345678 # dev guild for instant slash command sync
EMBER_DB_BACKEND=sqlite # sqlite | postgres | mongo
Run
python main.py # load all cogs
python main.py birthday # load one cog (dev/debug)
On first start, slash commands sync to your dev guild instantly. Global sync takes up to one hour.
Docker
# Production
docker compose --profile production up -d
# Development (code mounted, auto-reload)
docker compose --profile development up
See docs/DEPLOYMENT.md for full Docker, PM2, and systemd deployment guides.
Plugins
Privacy-sensitive cogs live in the separate Ember-extras repository so the core stays clean and auditable.
Install a plugin:
# Clone extras next to Ember
git clone https://github.com/guardiansofspartax/Ember-extras.git ../Ember-extras
# Symlink (or copy) the plugin into cogs/
ln -s ../../Ember-extras/confessions cogs/community/confessions
Then restart the bot โ Ember's auto-loader will pick it up.
Development
make install # create venv + install all deps
make pre-commit # install git hooks
make lint # ruff + black + mypy
make test # pytest
make test-cov # pytest with coverage report
make security # bandit + pip-audit + safety
make dev-checks # everything above together
Adding a Cog
cogs/<category>/<cog_name>/
โโโ __init__.py # async setup(bot)
โโโ cog.py # EmberCog subclass with commands
โโโ service.py # business logic (optional, recommended)
from discord import app_commands
from core.cog import EmberCog
from core.permissions import PermissionLevel, requires
class MyCog(EmberCog):
@app_commands.command(name="hello", description="Say hello")
@requires(PermissionLevel.USER)
async def hello(self, interaction: discord.Interaction) -> None:
await self.send_success(interaction, f"Hey, {interaction.user.mention}!")
async def setup(bot):
await bot.add_cog(MyCog(bot))
See docs/COG_CONTRIBUTION.md for the full guide and docs/FRAMEWORK_API.md for the API reference (Store, cards, errors, checks, modlog, bank, i18n, formatting).
Project Structure
Ember/
โโโ cogs/ # All bot extensions (auto-discovered)
โ โโโ admin/
โ โโโ community/
โ โโโ economy/
โ โโโ fun/
โ โโโ integrations/
โ โโโ mod/
โ โโโ utility/
โโโ core/ # Framework internals
โ โโโ bot.py # EmberBot โ subclasses discord.ext.commands.Bot
โ โโโ cog.py # EmberCog base class
โ โโโ database.py # Multi-backend DatabaseManager (sqlite/pg/mongo/json)
โ โโโ permissions.py # @requires() decorator + PermissionLevel enum
โ โโโ modlog.py # Central moderation logging
โ โโโ rpc.py # JSON-RPC 2.0 server (optional)
โ โโโ errors.py # Exception hierarchy
โโโ utils/ # Shared helpers
โ โโโ cards.py # LayoutView card builders (Components V2)
โ โโโ views.py # Reusable UI views
โ โโโ validators.py # Input validation utilities
โโโ config/ # Environment and startup config
โโโ docs/ # Guides and architecture docs
โโโ scripts/ # CLI utilities (ember.py, dev_utils.py)
โโโ test/ # Test suite
โโโ main.py # Entry point
โโโ Dockerfile
โโโ docker-compose.yml
โโโ .env.example
Credits
Ember is built on the shoulders of giants:
- discord.py by Rapptz โ the async Discord library powering everything
- Red-DiscordBot by the Cog Creators team โ architectural inspiration for the cog system, permissions model, and modlog design
- Pycord โ reference for Components V2 UI patterns
License
Released into the public domain under the Unlicense.
Support
- Issues: GitHub Issues
- Discord: The Aakhri Station
- Docs:
docs/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ember_discord_bot-1.3.0.tar.gz.
File metadata
- Download URL: ember_discord_bot-1.3.0.tar.gz
- Upload date:
- Size: 271.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a0353fc9e26c0ff97f13cfd9e2db6efca988cc27531105410a888de20bc65af
|
|
| MD5 |
a95052c79f5816576fe69fce850dd708
|
|
| BLAKE2b-256 |
828e76469a9b0d141055299cc73f62beae47d613d4bae1aa19308c1d46403be6
|
File details
Details for the file ember_discord_bot-1.3.0-py3-none-any.whl.
File metadata
- Download URL: ember_discord_bot-1.3.0-py3-none-any.whl
- Upload date:
- Size: 327.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cfee57d3456c835005dbf0454a7cdcd5b75c34f6d6217d3719eb6c6354c62b3
|
|
| MD5 |
d844bfe9a2d12326c580983e50c44d9e
|
|
| BLAKE2b-256 |
e10b621e7017c124cc97980ca8763565b708dfe6cb6377e2992ba28034835904
|