obsproject / obs-bot

Source code for the obsproject Discord bot
https://discord.gg/obsproject
GNU General Public License v3.0
38 stars 18 forks source link

cogs.log_analysis: React to message for failed log analysis #5

Closed WizardCM closed 3 years ago

WizardCM commented 3 years ago

Description

If a log is detected but the analysis fails for some reason, react to the message in question.

image

If the message in question no longer exists when trying to add the reaction, the task silently fails.

Motivation and Context

Sometimes it's not clear if the bot detected a message from the bot.

A reaction represents "yes, the message & log link/file were seen, but something failed along the way and should be reported to the developers"

How Has This Been Tested?

Types of changes

Checklist:

derrod commented 3 years ago

I think I'd make some bigger changes to how log analysis is handled in the first place. Right now it sends the "typing..." status even if it's just a random text file, which is slightly annoying.

I hope to find a way that is a bit more elegant than to add something to every exception clause, and maybe also only add a reaction if all possible log candidates in a message have failed.

Perhaps even have different emotes for network errors and analyser errors (if only to aid us internally to see what went wrong rather than having to check bot logs).