Discord bot that notifies a text channel when someone joins monitored voice channels and keeps a lightweight SQLite history of voice activity.
- Migrated from the legacy
discord-py-slash-commandstack to moderndiscord.pyapplication commands - Fixed monitored-channel filtering so
CHANNEL_Xis actually respected - Added
/statsfor per-member activity lookup - Cleaned locale files and setup docs
- Simplified dependencies and modernized the Docker image
- Sends a notification when someone joins a monitored voice channel
- Optionally pings
@everyonewhen the first person enters an empty monitored channel - Tracks monitored voice joins in SQLite
- Persists the
/togglestate across restarts - Exposes
/leaders,/stats,/toggle, and/help - Supports English and Brazilian Portuguese locales
/leaders: shows the top members by monitored voice joins/stats [member]: shows stats for you or another member/toggle: enables or disables notifications/help: shows the command list
/toggle requires the Manage Server permission.
Moving between monitored voice channels does not increase the leaderboard.
- Create a Discord application and bot in the Discord Developer Portal.
- Enable the
Server Members Intentin the bot settings. - Invite the bot to your server with the
applications.commands,Send Messages, andView Channelspermissions. - Copy
.env.exampleto.env. - Fill in at least these values:
DISCORD_BOT_TOKENNOTIFICATION_CHANNELCHANNEL_1orMONITORED_CHANNEL_IDS
- Install dependencies:
pip install -r requirements.txt- Run the bot:
python bot.py| Variable | Required | Description |
|---|---|---|
DISCORD_BOT_TOKEN |
Yes | Bot token from Discord |
NOTIFICATION_CHANNEL |
Yes | Text channel that receives notifications |
CHANNEL_1 ... CHANNEL_10 |
Yes* | Backward-compatible monitored voice channel IDs |
MONITORED_CHANNEL_IDS |
No | Comma-separated alternative to CHANNEL_X |
RICH_PRESENCE |
No | Presence text shown on the bot profile |
ACTIVITY |
No | playing, listening, watching, streaming, or competing |
BOT_LOCALE |
No | Locale file name, for example en_US or pt_BR |
SHOW_LOG |
No | Enables info logging when true |
MENTION_EVERYONE_ON_EMPTY_CHANNEL |
No | Controls @everyone when the first user joins |
DATABASE_PATH |
No | SQLite file path, defaults to bot_database.db |
* You must define at least one monitored voice channel either through CHANNEL_X or MONITORED_CHANNEL_IDS.
Build and run:
docker compose up -d --buildThe compose file mounts bot_database.db so voice statistics survive container recreation.
- Slash commands can take a minute to appear globally after the first startup.
- Existing databases continue to work. User names are refreshed automatically as members interact again.
- Notification on/off state is stored in SQLite.
- CI and release now use only standard GitHub-hosted runners and GHCR publishing.
Bot para Discord que avisa em um canal de texto quando alguem entra em canais de voz monitorados e salva um historico simples em SQLite.
- Envia notificacoes quando alguem entra em um canal de voz monitorado
- Pode marcar
@everyonequando a primeira pessoa entra em uma call vazia - Registra entradas em canais monitorados
- Mantem o estado do
/togglemesmo apos reiniciar - Possui comandos
/leaders,/stats,/togglee/help
- Copie
.env.examplepara.env. - Preencha
DISCORD_BOT_TOKEN,NOTIFICATION_CHANNELe pelo menos umCHANNEL_X. - Rode
pip install -r requirements.txt. - Rode
python bot.py.
