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

[FEAT] timeout cog should clean up after users who leave during timeout #292

Open
tigattack opened this issue Jan 5, 2025 · 0 comments
Open
Labels
cog-timeout Issues related to the timeout cog.

Comments

@tigattack
Copy link
Member

tigattack commented Jan 5, 2025

Overview

Describe the solution you'd like

The cog should have a listener for the following events:

  • Member leave
  • Member kick
  • Member ban

Upon such events, it should check if state exists for the user in config and, if so, clear it.

Is this suggestion based on an existing problem? If so, please describe it

If a user is added to timeout and then banned, the cog won't clear the user's state from config.

This also creates the possibility for a bug where the situation described above occurs, then the user re-joins, misbehaves to the point a mod decides to time them out, and then the cog might just... break? I'm not sure exactly what would happen without inspecting the code, but it would be one of the following:

  • Previous state is simply overwritten with new state. No problem!
  • The new state is merged with the old state, potentially resulting in the user being returned from timeout with more roles than they entered with.
  • The cog just breaks. Something happens or nothing happens. It kills your cat. Idk.
@tigattack tigattack added enhancement Cog enhancements. cog-timeout Issues related to the timeout cog. labels Jan 5, 2025
@tigattack tigattack removed the enhancement Cog enhancements. label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cog-timeout Issues related to the timeout cog.
Projects
None yet
Development

No branches or pull requests

1 participant