Basic logging #43

Closed
opened 2025-10-18 00:17:10 -04:00 by sirdog3355 · 1 comment
sirdog3355 commented 2025-10-18 00:17:10 -04:00 (Migrated from github.com)

Desired functionality is that EnduraBot performs very basic logging functionality for moderative purposes.

  • Message deletion and the original content.
  • Message editing with the original and new content.
  • Use of /editrole.

Each of the 3 logging functions should be configured to either be on or off in variables.json.

Desired functionality is that EnduraBot performs very basic logging functionality for moderative purposes. - Message deletion and the original content. - Message editing with the original and new content. - Use of `/editrole`. Each of the 3 logging functions should be configured to either be on or off in `variables.json`.
sirdog3355 commented 2025-10-18 04:30:26 -04:00 (Migrated from github.com)

It appears that the relevant Discord events - on_message_delete and on_message_edit - only give a bot access to messages which were created during the bot's uptime. If the bot shuts down or reboots, this cache is wiped, and edits or deletions to messages prior to this reboot/shutdown will not be detected.

There are alternative events, such as on_raw_message_delete, but testing simply confirmed what I suspected: for true message deletion and edit logging, a persistent storage solution would be necessary (e.g a database), that way the bot always has access to relevant message data when using the aforementioned events.

Persistent storage of any kind at time of writing is outside the scope of this bot's features. Plenty of bots made by people far more knowledgeable than me, and making money doing it, exist if EDC wants this functionality.

Closing.

It appears that the relevant Discord events - `on_message_delete` and `on_message_edit` - only give a bot access to messages which were created during the bot's uptime. If the bot shuts down or reboots, this cache is wiped, and edits or deletions to messages prior to this reboot/shutdown will not be detected. There are alternative events, such as `on_raw_message_delete`, but testing simply confirmed what I suspected: for true message deletion and edit logging, a persistent storage solution would be necessary (e.g a database), that way the bot always has access to relevant message data when using the aforementioned events. Persistent storage of any kind at time of writing is outside the scope of this bot's features. Plenty of bots made by people far more knowledgeable than me, and making money doing it, exist if EDC wants this functionality. Closing.
Sign in to join this conversation.
No description provided.