From 2695fa056a05113ce01b12951e05ec4b735edb10 Mon Sep 17 00:00:00 2001 From: owocado <24418520+owocado@users.noreply.github.com> Date: Wed, 30 Jul 2025 15:30:10 +0530 Subject: [PATCH] Fix guild_only app command decorator --- discord/app_commands/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/app_commands/commands.py b/discord/app_commands/commands.py index dc895b483..2568f0027 100644 --- a/discord/app_commands/commands.py +++ b/discord/app_commands/commands.py @@ -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 # 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.dm_channel = False # Disable DM context