From 322c60383ba2e27f03088d0efde813f33cea69d5 Mon Sep 17 00:00:00 2001 From: AstreaTSS <25420078+AstreaTSS@users.noreply.github.com> Date: Fri, 7 Jun 2024 18:28:27 -0400 Subject: [PATCH] feat: add required_tag and make channel flags editable --- interactions/models/discord/channel.py | 3 +++ interactions/models/discord/enums.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/interactions/models/discord/channel.py b/interactions/models/discord/channel.py index d7d0ff263..539393ff8 100644 --- a/interactions/models/discord/channel.py +++ b/interactions/models/discord/channel.py @@ -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, @@ -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 @@ -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, diff --git a/interactions/models/discord/enums.py b/interactions/models/discord/enums.py index ca5330c85..a9aa85af4 100644 --- a/interactions/models/discord/enums.py +++ b/interactions/models/discord/enums.py @@ -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