pub struct ApplicationEmojiManager<'a, B: Backend> { /* private fields */ }Expand description
The emojis of the bot’s application, usable by the bot in every guild. Returned by
Context::application_emojis.
The cache does not keep application emojis, so the djs-model Emoji is
returned.
discord.js counterpart: ApplicationEmojiManager (client.application.emojis).
Implementations§
Source§impl<'a, B: Backend> ApplicationEmojiManager<'a, B>
impl<'a, B: Backend> ApplicationEmojiManager<'a, B>
Sourcepub fn fetch(
self,
emoji_id: EmojiId,
) -> Fetch<Emoji, impl Future<Output = Result<Emoji, Error>> + Send + 'a>
pub fn fetch( self, emoji_id: EmojiId, ) -> Fetch<Emoji, impl Future<Output = Result<Emoji, Error>> + Send + 'a>
An emoji (Get Application Emoji).
discord.js counterpart: ApplicationEmojiManager#fetch(id).
§Errors
Returns the REST error if the request failed.
Sourcepub async fn list(self) -> Result<Collection<EmojiId, Emoji>, Error>
pub async fn list(self) -> Result<Collection<EmojiId, Emoji>, Error>
Every emoji of the application (List Application Emojis).
discord.js counterpart: ApplicationEmojiManager#fetch().
§Errors
Returns the REST error if the request failed.
Sourcepub async fn create(self, body: &CreateApplicationEmoji) -> Result<Emoji, Error>
pub async fn create(self, body: &CreateApplicationEmoji) -> Result<Emoji, Error>
Uploads an emoji (Create Application Emoji).
discord.js counterpart: ApplicationEmojiManager#create.
§Errors
Returns the REST error if the request failed (at most 2000 emojis).
Sourcepub async fn edit(
self,
emoji_id: EmojiId,
body: &ModifyApplicationEmoji,
) -> Result<Emoji, Error>
pub async fn edit( self, emoji_id: EmojiId, body: &ModifyApplicationEmoji, ) -> Result<Emoji, Error>
Renames an emoji (Modify Application Emoji).
discord.js counterpart: ApplicationEmojiManager#edit.
§Errors
Returns the REST error if the request failed.
Trait Implementations§
Source§impl<B: Backend> Clone for ApplicationEmojiManager<'_, B>
impl<B: Backend> Clone for ApplicationEmojiManager<'_, B>
impl<B: Backend> Copy for ApplicationEmojiManager<'_, B>
Auto Trait Implementations§
impl<'a, B> !RefUnwindSafe for ApplicationEmojiManager<'a, B>
impl<'a, B> !UnwindSafe for ApplicationEmojiManager<'a, B>
impl<'a, B> Freeze for ApplicationEmojiManager<'a, B>
impl<'a, B> Send for ApplicationEmojiManager<'a, B>
impl<'a, B> Sync for ApplicationEmojiManager<'a, B>
impl<'a, B> Unpin for ApplicationEmojiManager<'a, B>
impl<'a, B> UnsafeUnpin for ApplicationEmojiManager<'a, B>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more