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

Mute/Unmute command #3

Open
ryan-harrington opened this issue May 29, 2020 · 8 comments
Open

Mute/Unmute command #3

ryan-harrington opened this issue May 29, 2020 · 8 comments
Labels
enhancement New feature or request

Comments

@ryan-harrington
Copy link

ryan-harrington commented May 29, 2020

A command that will auto-add a "Muted" role disabling certain permissions.

Options

-mute <discord-name>
-mute <discord-name> <minutes>
-unmute <discord-name>

@ryan-harrington ryan-harrington changed the title Mute command Mute/Unmute command May 29, 2020
@ghost ghost added the enhancement New feature or request label Jun 5, 2020
@lynxclinical
Copy link

I could code you one, if you would like.

@Natemo2625
Copy link

this is one of the things i cant figure out XD, been trying to make a mute command for a while now

@ryan-harrington
Copy link
Author

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.

@Natemo2625
Copy link

could someone help me with one?

@Em1tt
Copy link

Em1tt commented Nov 29, 2020

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.

@AllanGame
Copy link
Owner

Okay, I'll resume the project and add the mute command by taking your suggestions in.

@AllanGame
Copy link
Owner

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

@Em1tt
Copy link

Em1tt commented Jan 12, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants