Skip to content

Commit 457ac02

Browse files
authored
feat: add required_tag and make channel flags editable (#1693)
1 parent a96a834 commit 457ac02

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

interactions/models/discord/channel.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,7 @@ async def edit(
833833
rtc_region: Absent[Union["models.VoiceRegion", str]] = MISSING,
834834
video_quality_mode: Absent[VideoQualityMode] = MISSING,
835835
default_auto_archive_duration: Absent[AutoArchiveDuration] = MISSING,
836+
flags: Absent[Union[int, ChannelFlags]] = MISSING,
836837
archived: Absent[bool] = MISSING,
837838
auto_archive_duration: Absent[AutoArchiveDuration] = MISSING,
838839
locked: Absent[bool] = MISSING,
@@ -858,6 +859,7 @@ async def edit(
858859
rtc_region: Channel voice region id, automatic when set to None.
859860
video_quality_mode: The camera video quality mode of the voice channel
860861
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
862+
flags: Channel flags combined as a bitfield. Only REQUIRE_TAG is supported for now.
861863
archived: Whether the thread is archived
862864
auto_archive_duration: Duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080
863865
locked: Whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it
@@ -883,6 +885,7 @@ async def edit(
883885
"rtc_region": rtc_region.id if isinstance(rtc_region, models.VoiceRegion) else rtc_region,
884886
"video_quality_mode": video_quality_mode,
885887
"default_auto_archive_duration": default_auto_archive_duration,
888+
"flags": flags,
886889
"archived": archived,
887890
"auto_archive_duration": auto_archive_duration,
888891
"locked": locked,

interactions/models/discord/enums.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,8 @@ class SystemChannelFlags(DiscordIntFlag):
825825
class ChannelFlags(DiscordIntFlag):
826826
PINNED = 1 << 1
827827
""" Thread is pinned to the top of its parent forum channel """
828+
REQUIRE_TAG = 1 << 4
829+
"""Whether a tag is required to be specified when creating a thread in a Guild Forum or Media channel."""
828830
CLYDE_THREAD = 1 << 8
829831
"""This thread was created by Clyde"""
830832
HIDE_MEDIA_DOWNLOAD_OPTIONS = 1 << 15

0 commit comments

Comments
 (0)