Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bans and bulk deletes #30

Open
mniip opened this issue Nov 12, 2021 · 0 comments
Open

Bans and bulk deletes #30

mniip opened this issue Nov 12, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@mniip
Copy link
Member

mniip commented Nov 12, 2021

Currently when a user gets banned, the gateway emits a bunch of bulk message deletes (one per channel, but could be multiple per channel if there's many messages), but could still emit single deletes if there's only one message in a channel. We'd like to log purged messages from banned members in the permanent log channel (not the temporary one). However telling apart which deletes correspond to a purge is not trivial.

One option is wait a little bit before reporting a delete, to see if any other deletes from the same user arrive, and if a "guild_member_ban" event happens in the meantime, we switch the reporting channel.

A simpler option is to log everything to the temporary channel, and when a "guild_member_ban" event happens, we additionally log all the messages we have for that user (we don't delete deleted messages from the db) in the permanent channel.

@mniip mniip added the enhancement New feature or request label Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant