Skip to main content

EditSoundboard

Struct EditSoundboard 

Source
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:

Discord docs

Implementations§

Source§

impl<'a> EditSoundboard<'a>

Source

pub fn new() -> EditSoundboard<'a>

Available on crate feature builder only.

Equivalent to Self::default.

Source

pub fn name(self, name: impl Into<String>) -> EditSoundboard<'a>

Available on crate feature builder only.

The name of the soundboard sound to set.

Note: Must be between 2 and 32 characters long.

Source

pub fn volume(self, volume: f64) -> EditSoundboard<'a>

Available on crate feature builder only.

Set the volume of the soundboard sound.

Note: Must be between 0 to 1.

Source

pub fn emoji_id(self, id: EmojiId) -> EditSoundboard<'a>

Available on crate feature builder only.

Set the ID of the custom emoji.

Source

pub fn emoji_name(self, name: String) -> EditSoundboard<'a>

Available on crate feature builder only.

Set the Unicode character of the custom emoji.

Source

pub fn audit_log_reason(self, reason: &'a str) -> EditSoundboard<'a>

Available on crate feature builder only.

Sets the request’s audit log reason.

Trait Implementations§

Source§

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,

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)

Additional data that’s only required when sending a request off to the API.
Source§

type Built = Soundboard

Source§

impl<'a> Clone for EditSoundboard<'a>

Source§

fn clone(&self) -> EditSoundboard<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for EditSoundboard<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'a> Default for EditSoundboard<'a>

Source§

fn default() -> EditSoundboard<'a>

Returns the “default value” for a type. Read more
Source§

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,

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneDebuggableStorage for T

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> CloneableStorage for T
where T: Any + Send + Sync + Clone,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DebuggableStorage for T
where T: Any + Send + Sync + Debug,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T