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() -> EditSoundboard<'a>
Available on crate feature builder only.
pub fn new() -> EditSoundboard<'a>
builder only.Equivalent to Self::default.
Sourcepub fn name(self, name: impl Into<String>) -> EditSoundboard<'a>
Available on crate feature builder only.
pub fn name(self, name: impl Into<String>) -> EditSoundboard<'a>
builder only.The name of the soundboard sound to set.
Note: Must be between 2 and 32 characters long.
Sourcepub fn volume(self, volume: f64) -> EditSoundboard<'a>
Available on crate feature builder only.
pub fn volume(self, volume: f64) -> EditSoundboard<'a>
builder only.Set the volume of the soundboard sound.
Note: Must be between 0 to 1.
Sourcepub fn emoji_id(self, id: EmojiId) -> EditSoundboard<'a>
Available on crate feature builder only.
pub fn emoji_id(self, id: EmojiId) -> EditSoundboard<'a>
builder only.Set the ID of the custom emoji.
Sourcepub fn emoji_name(self, name: String) -> EditSoundboard<'a>
Available on crate feature builder only.
pub fn emoji_name(self, name: String) -> EditSoundboard<'a>
builder only.Set the Unicode character of the custom emoji.
Sourcepub fn audit_log_reason(self, reason: &'a str) -> EditSoundboard<'a>
Available on crate feature builder only.
pub fn audit_log_reason(self, reason: &'a str) -> EditSoundboard<'a>
builder only.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 CacheHttp + 'async_trait,
ctx: <EditSoundboard<'_> as Builder>::Context<'life0>,
) -> Pin<Box<dyn Future<Output = Result<<EditSoundboard<'_> as Builder>::Built, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
EditSoundboard<'_>: 'async_trait,
fn execute<'life0, 'async_trait>(
self,
cache_http: impl CacheHttp + 'async_trait,
ctx: <EditSoundboard<'_> as Builder>::Context<'life0>,
) -> Pin<Box<dyn Future<Output = Result<<EditSoundboard<'_> as Builder>::Built, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
EditSoundboard<'_>: '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
Source§impl<'a> Serialize for EditSoundboard<'a>
impl<'a> Serialize for EditSoundboard<'a>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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> UnsafeUnpin 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