Skip to content

Commit f3583b1

Browse files
authored
fix: bound app_permissions for HybridContext (#1492)
1 parent a38b56f commit f3583b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

interactions/ext/hybrid_commands/context.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ def from_prefixed_context(cls, ctx: prefixed.PrefixedContext) -> Self:
118118
app_permissions = ctx.channel.permissions_for(ctx.guild.me) # type: ignore
119119
elif ctx.channel.type in {10, 11, 12}: # it's a thread
120120
app_permissions = ctx.channel.parent_channel.permissions_for(ctx.guild.me) # type: ignore
121+
else:
122+
app_permissions = Permissions(0)
121123

122124
self = cls(ctx.client)
123125
self.guild_id = ctx.guild_id

0 commit comments

Comments
 (0)