Skip to content

Commit 09d1bec

Browse files
authored
feat: add permissions attr to BaseChannel (#1443)
Co-authored-by: Astrea49 <25420078+Astrea49@users.noreply.github.com>
1 parent 6faeb41 commit 09d1bec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

interactions/models/discord/channel.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,8 @@ class BaseChannel(DiscordObject):
775775
"""The name of the channel (1-100 characters)"""
776776
type: Union[ChannelType, int] = attrs.field(repr=True, converter=ChannelType)
777777
"""The channel topic (0-1024 characters)"""
778+
permissions: Optional[Permissions] = attrs.field(repr=False, default=None, converter=optional_c(Permissions))
779+
"""Calculated permissions for the bot in this channel, only given when using channels as an option with slash commands"""
778780

779781
@classmethod
780782
def from_dict_factory(cls, data: dict, client: "Client") -> "TYPE_ALL_CHANNEL":

0 commit comments

Comments
 (0)