Skip to content

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

@tigattack

Description

@tigattack

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cog-timeoutIssues related to the timeout cog.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions