-
-
Notifications
You must be signed in to change notification settings - Fork 467
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
Slash Commands Permissions don't work sometimes #1155
Comments
Update: 6 hours and still not accessible. |
I'm experiencing a similar issue as well as once I made the commands global, the permissions were loading incorrectly. |
Same. Something that seemed odd to me is that there is a section in Bot.sync_commands, which seems to handle global commands but is not triggered unless there are some guild-specific ones. I was unable to replicate this tho, Im gonna try to modify the routine anyways |
I have a similar issue, I have used @_cog_control.command(name="list", default_permission=False)
@permissions.is_owner()
async def list_cogs(self, ctx: ApplicationContext) -> None:
"""List all cogs."""
... |
Update: looks like the current permission model only supports guild-specific permissions. Code to register global permissions is not run when not registering to a specific guild. We'll se what permissions v2 will give us. |
All effort on the permissions front will be put towards v2, as v1 will be deprecated soon. No plans to fix this as it's soon to be obsolete. |
Summary
The permissions aren't registered correctly.
Reproduction Steps
So I have 2 bots. 1 main bot and other beta bot.
I tested out
@permissions.has_role
on a slash commnad.Here is the code: (Same on both bots)
The permission works on beta bot but not on main bot.
This is to note that I also have
debug_guilds=[...]
for my beta bot.This is also to mention that its been 2-3 hours since the main bot was started. No restarts in between.
Minimal Reproducible Code
No response
Expected Results
The command permissions should work on both equally.
Actual Results
Works only on beta bot.
Intents
intents = discord.Intents(guild_reactions=True, guild_messages=True, guilds=True, dm_messages=True, members=True)
System Information
- Python v3.8.10-final - py-cord v2.0.0-beta - py-cord pkg_resources: v2.0.0b5 - aiohttp v3.8.1 - system info: Linux 5.11.0-1029-gcp #33~20.04.3-Ubuntu SMP Tue Jan 18 12:03:29 UTC 2022
Checklist
Additional Context
No response
The text was updated successfully, but these errors were encountered: