Skip to content
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

Fix permissions fetching for User Installable Bots #6457

Open
wants to merge 1 commit into
base: V3/develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion redbot/core/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading