bot
bot copied to clipboard
Support rescheduling of offensive message deletions
Site issue: python-discord/site#364
The site issue contains most of the details here:
When a message trips the filter on the bot it is removed after a period of time. During this period it is a record in the database.
When this deletion date is reached the bot will attempt to remove the message from Discord and remove the record from the offensive message table. We currently handle for the message being not found (deleted) but if another error occurs resulting in the message not being deleted we still continue to delete the database record, causing the message to be left around.
We should allow the bot to perform a PATCH request to the deleted message endpoint to update the delete time and reschedule if something has failed (for example, a hiccup on Discord's end).
However, we must also bear in mind that permanent rescheduling could potentially leave lingering records in our database if a case is discovered where a message which cannot be deleted is rescheduled repetitively.
This issue is blocking on a site PR being created to address this.
The site feature has been implemented, so this issue can now be worked on.