Skip to content

feat: add REQUIRE_TAG and make channel flags editable #1693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading