A Discord bot that kicks inactive server members
  • Python 79.9%
  • Nix 20.1%
Find a file
2025-09-27 14:52:34 +02:00
.envrc Switch to nix-only development environment 2025-09-27 14:51:48 +02:00
.gitignore Update gitignore 2025-09-27 14:27:35 +02:00
flake.lock Remove autoaspm references 2025-09-27 14:27:12 +02:00
flake.nix Switch to nix-only development environment 2025-09-27 14:51:48 +02:00
goodbye_songs.json More goodbye songs for more variety 2025-01-24 10:39:24 +01:00
main.py Switch to nix-only development environment 2025-09-27 14:51:48 +02:00
module.nix Switch to nix-only development environment 2025-09-27 14:51:48 +02:00
package.nix Switch to nix-only development environment 2025-09-27 14:51:48 +02:00
README.md Update README.md 2024-10-19 15:27:14 +02:00

AdiosBot

Adios, inactive members.

5871-adios-card-chihuahua

A bot that monitors member inactivity in your Discord server and lets you kick members that haven't posted any messages in x days.

Once you run the bot, it will download the last 10000 messages in every channel, and store the timestamp of the last message for every server member.

On subsequent runs, only new messages will be downloaded.

Due to Discord's limitations, only the last 10000 messages from every channel can be downloaded.

Depending on how active your server is, you might want to leave the bot running for some time before kicking any members.

For example, if you want to kick members that haven't sent any messages in 30 days, it might be necessary to run the bot for 30 days.

When in doubt, examine the respective channel logs (located in WORKING_DIR/message_logs) and check the earliest recorded timestamp.

Usage

source .envrc
export DISCORD_BOT_TOKEN="token"
export WORKING_DIR=$(pwd)
python3 main.py

Commands

  • !inactive n Show users who haven't posted any messages in the past n days
  • !kick_inactive n Kick users who haven't posted any messages in the past n days
  • !whitelist add name Add user name to the whitelist (will not get kicked even if inactive)
  • !whitelist remove name Remove user name from the whitelist
  • !whitelist show  Show the current whitelist