-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
How Can I make a certain cog work in a single text channel? #5847
-
Hey Im new here and Im wondering if I could make a cog only work in single text channel
Beta Was this translation helpful? Give feedback.
All reactions
If you are referring to a single text channel in a single server, japan's answer is mostly correct, you can use permissions to set a default in the server of deny and add a rule to allow it in that channel. Do note that allowing commands will override existing checks, so commands locked behind conditions such as being the guild owner should probably not be included in your allow. Also note that this will not change the behavior of any listeners, only commands (invoked with your prefix). Without knowing the specific cog you want to restrict and if it has any built-in ways to restrict how it can be used, it's hard to give you any specific instructions.
If you want it to only be used in a si...
Replies: 2 comments 1 reply
-
You can do that using the permissions cog, [p]load permissions & [p]permissions addserverrule <allow_or_deny> <cog_or_command> <who_or_what...> or any other subcommand you might feel like gets with your needs.
Beta Was this translation helpful? Give feedback.
All reactions
-
Also iirc it's recommended to join the red support server for questions like this. Faster support in general.
Beta Was this translation helpful? Give feedback.
All reactions
-
If you are referring to a single text channel in a single server, japan's answer is mostly correct, you can use permissions to set a default in the server of deny and add a rule to allow it in that channel. Do note that allowing commands will override existing checks, so commands locked behind conditions such as being the guild owner should probably not be included in your allow. Also note that this will not change the behavior of any listeners, only commands (invoked with your prefix). Without knowing the specific cog you want to restrict and if it has any built-in ways to restrict how it can be used, it's hard to give you any specific instructions.
If you want it to only be used in a single text channel across the entire bot, that is not easily possible.
As japan alluded to, for support questions such as this, the best place to ask them is the #support channel of the Red discord server. If you need any further support with this, or any other issue, please ask there.
Beta Was this translation helpful? Give feedback.