pub struct EditSticker<'a> { /* private fields */ }
Expand description
A builder to create or edit a Sticker
for use via a number of model methods.
These are:
Implementations§
Source§impl<'a> EditSticker<'a>
impl<'a> EditSticker<'a>
Sourcepub fn new() -> Self
pub fn new() -> Self
Equivalent to Self::default
.
Sourcepub fn name(self, name: impl Into<String>) -> Self
pub fn name(self, name: impl Into<String>) -> Self
The name of the sticker to set.
Note: Must be between 2 and 30 characters long.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
The description of the sticker.
Note: If not empty, must be between 2 and 100 characters long.
The Discord name of a unicode emoji representing the sticker’s expression.
Note: Must be between 2 and 200 characters long.
Sourcepub fn audit_log_reason(self, reason: &'a str) -> Self
pub fn audit_log_reason(self, reason: &'a str) -> Self
Sets the request’s audit log reason.
Trait Implementations§
Source§impl Builder for EditSticker<'_>
impl Builder for EditSticker<'_>
Source§fn execute<'life0, 'async_trait>(
self,
cache_http: impl 'async_trait + CacheHttp,
ctx: Self::Context<'life0>,
) -> Pin<Box<dyn Future<Output = Result<Self::Built>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
self,
cache_http: impl 'async_trait + CacheHttp,
ctx: Self::Context<'life0>,
) -> Pin<Box<dyn Future<Output = Result<Self::Built>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Edits the sticker.
Note: If the sticker was created by the current user, requires either the Create Guild Expressions or the Manage Guild Expressions permission. Otherwise, the Manage Guild Expressions permission is required.
§Errors
Returns Error::Http
if the current user lacks permission, or if invalid data is given.
Source§type Context<'ctx> = (GuildId, StickerId)
type Context<'ctx> = (GuildId, StickerId)
type Built = Sticker
Source§impl<'a> Clone for EditSticker<'a>
impl<'a> Clone for EditSticker<'a>
Source§fn clone(&self) -> EditSticker<'a>
fn clone(&self) -> EditSticker<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more