pub struct EditSoundboard<'a> { /* private fields */ }Expand description
A builder to create or edit a Soundboard for use via a number of model methods.
These are:
Implementations§
Source§impl<'a> EditSoundboard<'a>
impl<'a> EditSoundboard<'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 soundboard sound to set.
Note: Must be between 2 and 32 characters long.
Sourcepub fn volume(self, volume: f64) -> Self
pub fn volume(self, volume: f64) -> Self
Set the volume of the soundboard sound.
Note: Must be between 0 to 1.
Sourcepub fn emoji_name(self, name: String) -> Self
pub fn emoji_name(self, name: String) -> Self
Set the Unicode character of the custom emoji.
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 EditSoundboard<'_>
impl Builder for EditSoundboard<'_>
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 soundboard sound.
Note: If the soundboard sound 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, SoundId)
type Context<'ctx> = (GuildId, SoundId)
Additional data that’s only required when sending a request off to the API.
type Built = Soundboard
Source§impl<'a> Clone for EditSoundboard<'a>
impl<'a> Clone for EditSoundboard<'a>
Source§fn clone(&self) -> EditSoundboard<'a>
fn clone(&self) -> EditSoundboard<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for EditSoundboard<'a>
impl<'a> Debug for EditSoundboard<'a>
Source§impl<'a> Default for EditSoundboard<'a>
impl<'a> Default for EditSoundboard<'a>
Source§fn default() -> EditSoundboard<'a>
fn default() -> EditSoundboard<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for EditSoundboard<'a>
impl<'a> RefUnwindSafe for EditSoundboard<'a>
impl<'a> Send for EditSoundboard<'a>
impl<'a> Sync for EditSoundboard<'a>
impl<'a> Unpin for EditSoundboard<'a>
impl<'a> UnwindSafe for EditSoundboard<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more