Table of contents
- Command Check Decorators
- redbot.core.commands.admin()
- redbot.core.commands.admin_or_can_manage_channel(, allow_thread_owner=False)
- redbot.core.commands.admin_or_permissions(**perms)
- redbot.core.commands.bot_can_manage_channel(, allow_thread_owner=False)
- redbot.core.commands.bot_can_react()
- redbot.core.commands.bot_has_permissions(**perms)
- redbot.core.commands.bot_in_a_guild()
- redbot.core.commands.can_manage_channel(, allow_thread_owner=False)
- redbot.core.commands.guildowner()
- redbot.core.commands.guildowner_or_can_manage_channel(, allow_thread_owner=False)
- redbot.core.commands.guildowner_or_permissions(**perms)
- redbot.core.commands.has_guild_permissions(**perms)
- redbot.core.commands.has_permissions(**perms)
- redbot.core.commands.is_owner()
- redbot.core.commands.mod()
- redbot.core.commands.mod_or_can_manage_channel(, allow_thread_owner=False)
- redbot.core.commands.mod_or_permissions(**perms)
- redbot.core.commands.permissions_check(predicate)
This page is generated from
docs/framework_checks.rst- please edit the source file instead of this page.
Command Check Decorators
The following are all decorators for commands, which add restrictions to where and when they can be run.
redbot.core.commands.admin()
Restrict the command to users with the admin role.
This check can be overridden by rules.
redbot.core.commands.admin_or_can_manage_channel(, allow_thread_owner=False)
Restrict the command to users with the admin role or permissions to manage channel.
This check properly resolves the permissions for discord.Thread as well.
This check can be overridden by rules.
- Parameters:
allow_thread_owner (bool) -- If
True, the command will also be allowed to run if the author is a thread owner. This can, for example, be useful to check if the author can edit a channel/thread's name as that, in addition to members with manage channel/threads permission, can also be done by the thread owner.
redbot.core.commands.admin_or_permissions(**perms)
Restrict the command to users with the admin role or these permissions.
This check can be overridden by rules.
redbot.core.commands.bot_can_manage_channel(, allow_thread_owner=False)
Complain if the bot is missing permissions to manage channel.
This check properly resolves the permissions for discord.Thread as well.
- Parameters:
allow_thread_owner (bool) -- If
True, the command will also be allowed to run if the bot is a thread owner. This can, for example, be useful to check if the bot can edit a channel/thread's name as that, in addition to members with manage channel/threads permission, can also be done by the thread owner.
redbot.core.commands.bot_can_react()
Complain if the bot is missing permissions to react.
This check properly resolves the permissions for discord.Thread as well.
redbot.core.commands.bot_has_permissions(**perms)
Complain if the bot is missing permissions.
If the user tries to run the command, but the bot is missing the permissions, it will send a message describing which permissions are missing.
This check cannot be overridden by rules.
redbot.core.commands.bot_in_a_guild()
Deny the command if the bot is not in a guild.
redbot.core.commands.can_manage_channel(, allow_thread_owner=False)
Restrict the command to users with permissions to manage channel.
This check properly resolves the permissions for discord.Thread as well.
This check can be overridden by rules.
- Parameters:
allow_thread_owner (bool) -- If
True, the command will also be allowed to run if the author is a thread owner. This can, for example, be useful to check if the author can edit a channel/thread's name as that, in addition to members with manage channel/threads permission, can also be done by the thread owner.
redbot.core.commands.guildowner()
Restrict the command to the guild owner.
This check can be overridden by rules.
redbot.core.commands.guildowner_or_can_manage_channel(, allow_thread_owner=False)
Restrict the command to the guild owner or user with permissions to manage channel.
This check properly resolves the permissions for discord.Thread as well.
This check can be overridden by rules.
- Parameters:
allow_thread_owner (bool) -- If
True, the command will also be allowed to run if the author is a thread owner. This can, for example, be useful to check if the author can edit a channel/thread's name as that, in addition to members with manage channel/threads permission, can also be done by the thread owner.
redbot.core.commands.guildowner_or_permissions(**perms)
Restrict the command to the guild owner or users with these permissions.
This check can be overridden by rules.
redbot.core.commands.has_guild_permissions(**perms)
Restrict the command to users with these guild permissions.
This check can be overridden by rules.
redbot.core.commands.has_permissions(**perms)
Restrict the command to users with these permissions.
This check can be overridden by rules.
redbot.core.commands.is_owner()
Restrict the command to bot owners.
This check cannot be overridden by rules.
redbot.core.commands.mod()
Restrict the command to users with the mod role.
This check can be overridden by rules.
redbot.core.commands.mod_or_can_manage_channel(, allow_thread_owner=False)
Restrict the command to users with the mod role or permissions to manage channel.
This check properly resolves the permissions for discord.Thread as well.
This check can be overridden by rules.
- Parameters:
allow_thread_owner (bool) -- If
True, the command will also be allowed to run if the author is a thread owner. This can, for example, be useful to check if the author can edit a channel/thread's name as that, in addition to members with manage channel/threads permission, can also be done by the thread owner.
redbot.core.commands.mod_or_permissions(**perms)
Restrict the command to users with the mod role or these permissions.
This check can be overridden by rules.
redbot.core.commands.permissions_check(predicate)
An overwriteable version of discord.ext.commands.check.
This has the same behaviour as discord.ext.commands.check,
however this check can be ignored if the command is allowed
through a permissions cog.
Installation Guides
- Installing Red
- Creating a bot account
- Updating Red
- Backing Up and Restoring Red
- About Virtual Environments
- Setting up auto-restart using batch on Windows
- Setting up auto-restart on Mac
- Setting up auto-restart using systemd on Linux
Cog Reference
User guides
- Getting started
- Running Red on Fluxer
- About Privileged Intents
- About public (big) bots
- Admin
- Alias
- Audio
- Cleanup
- Cog Manager UI
- Core
- CustomCommands
- Dev
- Downloader
- Economy
- Filter
- General
- Image
- Permissions
- Mod
- ModLog
- Mutes
- Reports
- Streams
- Trivia
- Warnings
- Red and End User Data
Cog Creation Guides
- Creating cogs for Red
- Slash Commands and Interactions
- Publishing cogs for Red
- Becoming an Approved Cog Creator
- Versioning
- End-user Guarantees
- Developer Guarantees
- Breaking Change Notices
Cog Development Framework Reference
- Shared API Keys
- Bank
- Bot
- Command Check Decorators
- App Command Check Decorators
- Commands Package
- App Commands Package
- Config
- Data Manager
- Custom Events
- Internationalization Framework
- Mod log
- RPC
- Tree
- Utility Functions
Others
Legacy (Red V2)