Erisa/Cliptok

Bug: Automatic deletion of empty tech support threads can conflict with auto-warn

Closed this issue · 1 comments

If a user opens a tech support forum thread and their original thread message contains content that Cliptok would issue an automatic warning for, it attempts to automatically warn, leading to the (infringing) original message being deleted, and then the thread will be automatically deleted because it is empty. This automatic thread deletion can cause the auto-warn to fail. Errors seem to vary a bit but it's always a NotFoundException.

For mods, an example is here: https://discord.com/channels/150662382874525696/745276933767430255/1277080175774797948. In this example the warning happened to be successful. Cliptok did record the context message with the warning, but it did also throw an error: Request to "https://discord.com/api/v10/channels/1277079894508961875/messages/1277079894508961875" triggered an exception DSharpPlus.Exceptions.NotFoundException: Not found: NotFound.

This is definitely something that's just up to chance when it happens. I am thinking maybe the best way to handle it would be:

  • Auto-delete the infringing message
  • Let the thread auto-delete happen
  • Auto-warn as usual, but skip sending the public warning message?

We shouldn't skip sending public messages because they are the fallback mechanism for notifying users of their warning if they have DMs disabled.

For this case I would lean towards either adding special handling so that the warning message is the only thing left in the thread, OR put the warning messages in #tech-support.

Whichever we choose for both, we also need to think about #feedback-hub-forum