LeicaSimile / PROJECT-Ashe

A bot for humanity, available in Discord.
0 stars 0 forks source link

Speed up inactivity scan for inactivelist command #4

Open LeicaSimile opened 2 years ago

LeicaSimile commented 2 years ago

The inactivelist command iterates through channel in the server and checks each message sent within the past number of days specified. If reactions are counted as activity, each message's reactions are also checked. With around 50,000 messages across 81 channels, the scan may take around an hour to complete.

At the very least, caching can help reduce times for subsequent scans. Other changes to the logic should also be considered to hasten the process.