#[non_exhaustive]pub struct ModifyGuildChannel {Show 19 fields
pub name: Option<CompactString>,
pub kind: Option<ChannelType>,
pub position: Patch<i32>,
pub topic: Patch<CompactString>,
pub nsfw: Patch<bool>,
pub rate_limit_per_user: Patch<u16>,
pub bitrate: Patch<u32>,
pub user_limit: Patch<u32>,
pub permission_overwrites: Patch<Vec<Overwrite>>,
pub parent_id: Patch<ChannelId>,
pub rtc_region: Patch<CompactString>,
pub video_quality_mode: Patch<VideoQualityMode>,
pub default_auto_archive_duration: Patch<AutoArchiveDuration>,
pub flags: Option<ChannelFlags>,
pub available_tags: Option<Vec<ForumTagData>>,
pub default_reaction_emoji: Patch<DefaultReaction>,
pub default_thread_rate_limit_per_user: Option<u16>,
pub default_sort_order: Patch<SortOrderType>,
pub default_forum_layout: Option<ForumLayoutType>,
}Expand description
The body of Modify Channel for a guild channel (D-109).
Every field is optional; Patch fields can also be cleared. Which fields apply depends
on the channel’s type (e.g. bitrate only for voice and stage channels).
discord.js counterpart: GuildChannelEditOptions.
§Examples
use djs_model::{rest::ModifyGuildChannel, util::Patch};
let mut body = ModifyGuildChannel::default();
body.name = Some("general".into());
body.topic = Patch::Clear;
assert_eq!(serde_json::to_string(&body).unwrap(), r#"{"name":"general","topic":null}"#);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: Option<CompactString>The name (1-100 characters).
kind: Option<ChannelType>The new type; only text ↔ announcement, in guilds with the NEWS feature.
position: Patch<i32>The position in the channel list (channels with the same position are sorted by ID).
topic: Patch<CompactString>The topic (0-1024 characters, 0-4096 for forum and media channels).
nsfw: Patch<bool>Whether the channel is age-restricted.
rate_limit_per_user: Patch<u16>Slowmode: seconds a member must wait between messages (0-21600).
bitrate: Patch<u32>The bitrate of a voice or stage channel, in bits per second (min 8000; the maximum depends on the guild’s boost level).
user_limit: Patch<u32>The user limit of a voice (max 99) or stage (max 10 000) channel; 0 is no limit.
permission_overwrites: Patch<Vec<Overwrite>>The permission overwrites (all of them; needs MANAGE_ROLES).
parent_id: Patch<ChannelId>The parent category.
rtc_region: Patch<CompactString>The voice region ID; Patch::Clear selects it automatically.
video_quality_mode: Patch<VideoQualityMode>The camera video quality of a voice or stage channel.
default_auto_archive_duration: Patch<AutoArchiveDuration>The archive duration that clients preselect for new threads.
flags: Option<ChannelFlags>The channel’s flags.
The tags of a forum or media channel (max 20); tags without an ID are created.
default_reaction_emoji: Patch<DefaultReaction>The emoji of the add-reaction button on posts of a forum or media channel.
default_thread_rate_limit_per_user: Option<u16>The slowmode copied to new threads.
default_sort_order: Patch<SortOrderType>The default order of posts in a forum or media channel.
default_forum_layout: Option<ForumLayoutType>The default layout of a forum channel.