Skip to content

Commit

Permalink
feat: add required_tag and make channel flags editable (#1693)
Browse files Browse the repository at this point in the history
  • Loading branch information
AstreaTSS authored Jun 8, 2024
1 parent a96a834 commit 457ac02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions interactions/models/discord/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,7 @@ async def edit(
rtc_region: Absent[Union["models.VoiceRegion", str]] = MISSING,
video_quality_mode: Absent[VideoQualityMode] = MISSING,
default_auto_archive_duration: Absent[AutoArchiveDuration] = MISSING,
flags: Absent[Union[int, ChannelFlags]] = MISSING,
archived: Absent[bool] = MISSING,
auto_archive_duration: Absent[AutoArchiveDuration] = MISSING,
locked: Absent[bool] = MISSING,
Expand All @@ -858,6 +859,7 @@ async def edit(
rtc_region: Channel voice region id, automatic when set to None.
video_quality_mode: The camera video quality mode of the voice channel
default_auto_archive_duration: The default duration that the clients use (not the API) for newly created threads in the channel, in minutes, to automatically archive the thread after recent activity
flags: Channel flags combined as a bitfield. Only REQUIRE_TAG is supported for now.
archived: Whether the thread is archived
auto_archive_duration: Duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080
locked: Whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it
Expand All @@ -883,6 +885,7 @@ async def edit(
"rtc_region": rtc_region.id if isinstance(rtc_region, models.VoiceRegion) else rtc_region,
"video_quality_mode": video_quality_mode,
"default_auto_archive_duration": default_auto_archive_duration,
"flags": flags,
"archived": archived,
"auto_archive_duration": auto_archive_duration,
"locked": locked,
Expand Down
2 changes: 2 additions & 0 deletions interactions/models/discord/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,8 @@ class SystemChannelFlags(DiscordIntFlag):
class ChannelFlags(DiscordIntFlag):
PINNED = 1 << 1
""" Thread is pinned to the top of its parent forum channel """
REQUIRE_TAG = 1 << 4
"""Whether a tag is required to be specified when creating a thread in a Guild Forum or Media channel."""
CLYDE_THREAD = 1 << 8
"""This thread was created by Clyde"""
HIDE_MEDIA_DOWNLOAD_OPTIONS = 1 << 15
Expand Down

0 comments on commit 457ac02

Please sign in to comment.