From bb2a32982999f78191e57808ee4fecc2babbe64b Mon Sep 17 00:00:00 2001 From: Kowlin Date: Tue, 24 Sep 2024 13:52:16 +0200 Subject: [PATCH] Fix for UIBs regarding permission fetching --- redbot/core/bot.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/redbot/core/bot.py b/redbot/core/bot.py index 89f711ef009..98c4a2c5e90 100644 --- a/redbot/core/bot.py +++ b/redbot/core/bot.py @@ -886,7 +886,12 @@ async def ignored_channel_or_guild( if ctx.channel.type is not discord.ChannelType.private: raise TypeError("Can't check permissions for non-private PartialMessageable.") is_private = True - perms = ctx.channel.permissions_for(author) + if isinstance(ctx, discord.Interaction): + perms = ctx.app_permissions + # The permissions here are always linked to the interaction author & + # the channel it originated from. + else: + perms = ctx.channel.permissions_for(author) surpass_ignore = ( is_private or perms.manage_guild