Erisa/Cliptok

Not possible to mute users not in the server

Closed this issue · 4 comments

It doesn't even delete the !mute message - perhaps it should delete the !mute message and then throw an error about not being able to mute the user because they left the server, similar to the error when attempting to unmute users who have left the server.

Erisa commented

The argument for the mute command is a a DiscordMember object rather than a generic DiscordUser object, since the user isn't a member of the server anymore it thinks you have invalid arguments and refuses to process the command.

The only ways I've found to bypass this built in check and give a custom error were sort of hacky (Or giving up and making it accept a DiscordUser instead and performing my own conversion), but I'll try a few things when I get time, thanks.

Oh, I see. Interesting.

Found another weird issue while testing this, gonna submit another issue as it's not related to this

Erisa commented

So for this one I had two ideas.

The first idea I had was to make it accept a DiscordUser, immediately convert it into a DiscordMember and if it failed give a meaningful message to the person using the command. While doing this I also experimented with the idea of creating self-deleting error messages and it turned out quite pretty.
You can see that here: https://cdn.erisa.moe/Hp0vAYYW8h.mp4

After putting that in, my next idea was to allow this situation. Because after all when someone is muted something more than a role addition happens, the mute is registered in Cliptoks database and the role is given out when the user (re)joins. This idea would make it possible to mute someone not currently in the server and have their mute role applied when they join unless it has expired by that time.

For now I will push the first idea, I can pursue the second if desired and when I get enough time to rework the mute system to accommodate it.
Keeping this issue open to track the topic, feel free to comment.

Erisa commented

Thank you github thats definitely what I wanted