Skip to content

Commit f1ade5d

Browse files
authored
feat: support clyde channel flag (#1375)
* feat: support clyde channel flag * feat: add thread prop for clyde created
1 parent c36da2a commit f1ade5d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

interactions/models/discord/channel.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,6 +1901,11 @@ def permission_overwrites(self) -> List["PermissionOverwrite"]:
19011901
"""The permission overwrites for this channel."""
19021902
return []
19031903

1904+
@property
1905+
def clyde_created(self) -> bool:
1906+
"""Whether this thread was created by Clyde."""
1907+
return ChannelFlags.CLYDE_THREAD in self.flags
1908+
19041909
def permissions_for(self, instance: Snowflake_Type) -> Permissions:
19051910
"""
19061911
Calculates permissions for an instance

interactions/models/discord/enums.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,8 @@ class SystemChannelFlags(DiscordIntFlag):
788788
class ChannelFlags(DiscordIntFlag):
789789
PINNED = 1 << 1
790790
""" Thread is pinned to the top of its parent forum channel """
791+
CLYDE_THREAD = 1 << 8
792+
"""This thread was created by Clyde"""
791793

792794
# Special members
793795
NONE = 0

0 commit comments

Comments
 (0)