site icon indicating copy to clipboard operation
site copied to clipboard

Support rescheduling of offensive messages

Open jb3 opened this issue 4 years ago • 4 comments

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.

jb3 avatar Jun 17 '20 20:06 jb3

This issue is blocking python-discord/bot#1013

jb3 avatar Jun 17 '20 20:06 jb3

If the bot has a way of interacting with staff as a whole:

  • have a hardcoded retry limit bigger than 1 that will be decremented every time deleting the message is unsuccessful (not due to it being deleted)
  • once limit is at 1, send a notification to staff as an embed; the embed has an up arrow and down arrow emoji
  • if up arrow is selected, the retry limit is incremented
  • if down arrow is selected the limit is decremented (to 0) and the message is deleted
  • if nothing is selected, on the next retry the message will be deleted

Could also have a circle arrow that would reset the limit (in addition or instead of the up arrow)

Thoughts?

doodspav avatar Jun 27 '20 09:06 doodspav

That really seems overkill IMO, we could just retry a fixed amount of time, and then forget about it.

Akarys42 avatar Jun 27 '20 10:06 Akarys42

This is easy enough to do, it wouldn't hurt. Assigned @jchristgit.

lemonsaurus avatar Jan 21 '22 20:01 lemonsaurus