Struct twilight_http::request::guild::create_guild_channel::CreateGuildChannel [−][src]
pub struct CreateGuildChannel<'a> { /* fields omitted */ }
Expand description
Create a new request to create a guild channel.
All fields are optional except for name. The minimum length of the name is 1 UTF-16 characters and the maximum is 100 UTF-16 characters.
Implementations
Set the bitrate of the channel. Applicable to voice channels only.
Set the kind of channel.
If this is specified, and the parent ID is a ChannelType::CategoryChannel
, create this
channel as a child of the category channel.
pub const fn permission_overwrites(
self,
permission_overwrites: &'a [PermissionOverwrite]
) -> Self
pub const fn permission_overwrites(
self,
permission_overwrites: &'a [PermissionOverwrite]
) -> Self
Set the permission overwrites of a channel.
Set the position of the channel.
Positions are numerical and zero-indexed. If you place a channel at position 2, channels 2-n will shift down one position and the initial channel will take its place.
pub const fn rate_limit_per_user(
self,
rate_limit_per_user: u64
) -> Result<Self, CreateGuildChannelError>
pub const fn rate_limit_per_user(
self,
rate_limit_per_user: u64
) -> Result<Self, CreateGuildChannelError>
Set the number of seconds that a user must wait before before they are able to send another message.
The minimum is 0 and the maximum is 21600. Refer to the discord docs for more details. This is also known as “Slow Mode”.
Errors
Returns a CreateGuildChannelErrorType::RateLimitPerUserInvalid
error
type if the amount is greater than 21600.
Set the topic.
The maximum length is 1024 UTF-16 characters. Refer to the discord docs for more details.
Errors
Returns a CreateGuildChannelErrorType::TopicInvalid
error type if
the topic length is too long.
For voice channels, set the user limit.
Set to 0 for no limit. Limit can otherwise be between 1 and 99 inclusive. Refer to the discord docs for more details.
pub fn exec(self) -> ResponseFuture<GuildChannel>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<GuildChannel>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Execute the request, returning a future resolving to a Response
.