We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b1a281 commit d6b91cfCopy full SHA for d6b91cf
discord/ext/commands/core.py
@@ -2116,8 +2116,9 @@ async def test(ctx):
2116
raise TypeError(f"Invalid permission(s): {', '.join(invalid)}")
2117
2118
def predicate(ctx: Context) -> bool:
2119
- ch = ctx.channel
2120
- permissions = ch.permissions_for(ctx.author) # type: ignore
+ if ctx.channel.type == ChannelType.private:
+ return True
2121
+ permissions = ctx.channel.permissions_for(ctx.author) # type: ignore
2122
2123
missing = [perm for perm, value in perms.items() if getattr(permissions, perm) != value]
2124
0 commit comments