pub struct StickerId(/* private fields */);Expand description
An identifier for a sticker.
Implementations§
Source§impl StickerId
impl StickerId
Sourcepub async fn delete(
self,
http: impl AsRef<Http>,
guild_id: impl Into<GuildId>,
) -> Result<()>
👎Deprecated: use GuildId::delete_sticker instead
pub async fn delete( self, http: impl AsRef<Http>, guild_id: impl Into<GuildId>, ) -> Result<()>
GuildId::delete_sticker insteadDelete a guild 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.
Sourcepub async fn to_sticker(self, http: impl AsRef<Http>) -> Result<Sticker>
pub async fn to_sticker(self, http: impl AsRef<Http>) -> Result<Sticker>
Requests the sticker via the REST API to get a Sticker with all details.
§Errors
Returns Error::Http if a Sticker with that StickerId does not exist, or is
otherwise unavailable.
Sourcepub async fn edit(
self,
cache_http: impl CacheHttp,
guild_id: impl Into<GuildId>,
builder: EditSticker<'_>,
) -> Result<Sticker>
👎Deprecated: use GuildId::edit_sticker instead
pub async fn edit( self, cache_http: impl CacheHttp, guild_id: impl Into<GuildId>, builder: EditSticker<'_>, ) -> Result<Sticker>
GuildId::edit_sticker insteadEdits 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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StickerId
impl<'de> Deserialize<'de> for StickerId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<NonZero<u64>> for StickerId
impl From<NonZero<u64>> for StickerId
Source§fn from(id: NonZeroU64) -> StickerId
fn from(id: NonZeroU64) -> StickerId
Source§impl From<StickerId> for NonZeroI64
impl From<StickerId> for NonZeroI64
Source§fn from(id: StickerId) -> NonZeroI64
fn from(id: StickerId) -> NonZeroI64
Source§impl From<StickerId> for NonZeroU64
impl From<StickerId> for NonZeroU64
Source§fn from(id: StickerId) -> NonZeroU64
fn from(id: StickerId) -> NonZeroU64
Source§impl Ord for StickerId
impl Ord for StickerId
Source§impl PartialOrd for StickerId
impl PartialOrd for StickerId
impl Copy for StickerId
impl Eq for StickerId
impl StructuralPartialEq for StickerId
Auto Trait Implementations§
impl Freeze for StickerId
impl RefUnwindSafe for StickerId
impl Send for StickerId
impl Sync for StickerId
impl Unpin for StickerId
impl UnwindSafe for StickerId
Blanket Implementations§
Source§impl<T> ArgumentConvert for Twhere
T: FromStr,
impl<T> ArgumentConvert for Twhere
T: FromStr,
Source§fn convert<'life0, 'async_trait>(
__arg0: impl CacheHttp + 'async_trait,
__arg1: Option<GuildId>,
__arg2: Option<ChannelId>,
s: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<T, <T as ArgumentConvert>::Err>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn convert<'life0, 'async_trait>(
__arg0: impl CacheHttp + 'async_trait,
__arg1: Option<GuildId>,
__arg2: Option<ChannelId>,
s: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<T, <T as ArgumentConvert>::Err>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
s as a command parameter of this type.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
Source§impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.