Open ryan-harrington opened 4 years ago
I could code you one, if you would like.
this is one of the things i cant figure out XD, been trying to make a mute command for a while now
I recommend having the bot create a Muted role if one doesn't exist already, store the role ID, then whenever the command is called, add the role to the user being muted (if permissions is given to the user using the command), remove every other role from the muted user (to remove permissions), and store the ID's of all those roles so they can be given back when the mute timer is done.
could someone help me with one?
I personally like a different approach for a mute command, that doesn't require a role. You could just run a .forEach on every channel and set permissions for the certain user so they can't type. It's quite easy to do.
Okay, I'll resume the project and add the mute command by taking your suggestions in.
I personally like a different approach for a mute command, that doesn't require a role. You could just run a .forEach on every channel and set permissions for the certain user so they can't type. It's quite easy to do.
That's not possible because it breaks the API tos
I personally like a different approach for a mute command, that doesn't require a role. You could just run a .forEach on every channel and set permissions for the certain user so they can't type. It's quite easy to do.
That's not possible because it breaks the API tos
It actually is possible, I use it a lot. Even if it rate-limits you, you can set a delay between each operation - Discord API isn't that strict, and you get a warning before getting banned, I got zero warnings so far. The thing I said is what you essentially have to do with both roles and users, so why not do it with users only. The thing is, when your bot creates a Muted role, you have to overwrite permissions for each channel of the guild, so the muted role either can't view it at all, or just can't chat in it. So it's essentially the same for both users and roles, with the exception that with roles you only have to overwrite permissions once and then assign the role accordingly
A command that will auto-add a "Muted" role disabling certain permissions.
Options
-mute <discord-name>
-mute <discord-name> <minutes>
-unmute <discord-name>