iamysko / cds

Discord bot based on Spring Boot. Implements JDA Discord API wrapper.
Apache License 2.0
8 stars 6 forks source link

Allow sweep to be used even if the user is no longer in the server #52

Open affenity opened 3 years ago

affenity commented 3 years ago

The Issue When a user no longer is in the server (either left, kicked, or banned), sweep does not work to clean their messages. This results in us having to use the manual command which is tedious when the reaction would work just fine for this.

The Solution This is probably a side-effect if you have implemented a check where you see if a user is in the server before proceeding with the quick-reaction commands. Either cache the recent users with a TTL or use the API to see if the user exists at all and then continue the command.

Phalanxia commented 3 years ago

Is this still powered by Carlbot's purge command or do we have a custom implementation for this now?

iamysko commented 3 years ago

Is this still powered by Carlbot's purge command or do we have a custom implementation for this now?

CDS uses its own implementation of JDA for this, see https://github.com/misterveiga/cds/issues/28

affenity commented 3 years ago

Is this still powered by Carlbot's purge command or do we have a custom implementation for this now?

Appears to be our custom implementation, as seen here: https://github.com/misterveiga/cds/blob/a8cd6777d97552033d81e8192f30d63f496829b2/src/main/java/com/misterveiga/cds/listeners/ReactionListener.java#L556