Skip to content

A Discord bot that kicks inactive server members

Notifications You must be signed in to change notification settings

notthebee/adiosbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Discord bot that kicks inactive server members

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published