Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How Can I make a certain cog work in a single text channel? #5847

Answered by Flame442
HimashaHerath asked this question in Q&A
Discussion options

Hey Im new here and Im wondering if I could make a cog only work in single text channel

You must be logged in to vote

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

Comment options

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.

You must be logged in to vote
1 reply
Comment options

Also iirc it's recommended to join the red support server for questions like this. Faster support in general.

Comment options

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.

You must be logged in to vote
0 replies
Answer selected by Flame442
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Type: Question This is a support question. Go to https://discord.gg/red for help.

AltStyle によって変換されたページ (->オリジナル) /