mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-08-11 14:02:13 +00:00
Fix guild_only app command decorator
This commit is contained in:
parent
ce9f5ad1ba
commit
2695fa056a
@ -2525,7 +2525,7 @@ def guild_only(func: Optional[T] = None) -> Union[T, Callable[[T], T]]:
|
|||||||
f.__discord_app_commands_contexts__ = allowed_contexts # type: ignore # Runtime attribute assignment
|
f.__discord_app_commands_contexts__ = allowed_contexts # type: ignore # Runtime attribute assignment
|
||||||
|
|
||||||
# Ensure that only Guild context is allowed
|
# Ensure that only Guild context is allowed
|
||||||
allowed_contexts.guild = False # Enable guild context
|
allowed_contexts.guild = True # Enable guild context
|
||||||
allowed_contexts.private_channel = False # Disable private channel context
|
allowed_contexts.private_channel = False # Disable private channel context
|
||||||
allowed_contexts.dm_channel = False # Disable DM context
|
allowed_contexts.dm_channel = False # Disable DM context
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user