bot
bot copied to clipboard
Discord Channel Logs Improvements
Note: This issue description is a brief and will be expanded in the near future with full details.
Current Setup
We use discord channels for providing logs of certain events, such as moderative actions, member updates, guild updates, message updates.
Log output is done through individual webhooks, to avoid contributing to the bot rate limits unnecessarily, and as it is an appropriate choice for a send-and-forget log system.
Sending messages to the logs requires hooking into the loaded Cog and using a helper function to send the appropriate information.
Events that should be skipped from logging are done by sending the event type and corresponding ID value (member ID for member updates, channel ID for channel updates, message ID for message updates).
There's not a lot of flexibility currently, and the API is a bit messy as slowly we've add more logs, destinations and behaviours contributing to complexity.
Purpose
This issue is to begin outlining our current and any possible future requirements for our discord channel logging system, any nice-to-haves that we might be able to think of, and to establish a preferred new API that will make development, configuration and future extension of the feature easier than it currently is.
Current Ideas
- Have an event-based model for dispatching logs (can consider utilising the existing bot dispatch and listening system).
- Ignore/filter specific events through the usage of a context manager and a function decorator.
How is this different than #303? I know you were talking to me while creating this issue but IIRC I was distracted by something else at the moment, sorry.
Edit: right, I remember now. This encompasses all events, like being able to ignore them. #303 is just for sending mod log messages.
Tbh I was tired and had already forgotten the existence of 303 also, but the scope of this is definitely wider than the original.
I don't think there's much actionable here at the moment, so i'll close this issue.