Struct twilight_http::request::channel::update_channel::UpdateChannel [−][src]
pub struct UpdateChannel<'a> { /* fields omitted */ }
Expand description
Update a channel.
All fields are optional. The minimum length of the name is 1 UTF-16 character and the maximum is 100 UTF-16 characters.
Implementations
Set the bitrate of the channel. Applicable to voice channels only.
Set the name.
The minimum length is 1 UTF-16 character and the maximum is 100 UTF-16 characters.
Errors
Returns an UpdateChannelErrorType::NameInvalid
error type if the name
length is too short or too long.
If this is specified, and the parent ID is a ChannelType::CategoryChannel
, move this
channel to 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. This will overwrite all permissions that the channel currently has, so use with caution!
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, UpdateChannelError>
pub const fn rate_limit_per_user(
self,
rate_limit_per_user: u64
) -> Result<Self, UpdateChannelError>
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 an UpdateChannelErrorType::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 an UpdateChannelErrorType::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.
Set the VideoQualityMode
for the voice channel.
Set the kind of channel.
Only conversion between ChannelType::GuildText
and ChannelType::GuildNews
is possible,
and only if the guild has the NEWS
feature enabled. Refer to the discord docs for more
details.
pub fn exec(self) -> ResponseFuture<Channel>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<Channel>ⓘ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
.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for UpdateChannel<'a>
impl<'a> Send for UpdateChannel<'a>
impl<'a> Sync for UpdateChannel<'a>
impl<'a> Unpin for UpdateChannel<'a>
impl<'a> !UnwindSafe for UpdateChannel<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more