amadea-system / GabbyGums

Gabby Gums is fully featured discord logging bot that is able to ignore all the extraneous deletes that PluralKit causes from proxied messages and log additional PK related detail.
Apache License 2.0
2 stars 4 forks source link

Unable to determine author of deleted webhook messages from DB Cache #18

Closed amadea-system closed 4 years ago

amadea-system commented 4 years ago

Because only the authors ID of a message is stored in the DB message cache, we are unable to look up details on the author of a deleted webhook message. While this only causes a problem if the message is not in the memory message cache as we use that as the primary lookup source, this can still occur if a webhook message older than the last reboot is deleted. It also currently results in an exception being thrown and the message not being logged at all.

Short term we should rework the "on_raw_message_delete" code to handle not being able to look up the author, and long term we need to start caching the authors name on webhook messages.

amadea-system commented 4 years ago

This issue has been partially solved by https://github.com/amadea-system/GabbyGums/commit/119e2f9ae6e72fe5319454f2bc100e93e223a5b5 . We still need to add webhook author caching to the DB in order to fully solve this issue.

amadea-system commented 4 years ago

Closed by https://github.com/amadea-system/GabbyGums/commit/7259cb49c04c38763ac74d9a0d06917b00ba5433