#[repr(packed(1))]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
insteadAvailable on crate feature model
only.
pub async fn delete( self, http: impl AsRef<Http>, guild_id: impl Into<GuildId> ) -> Result<()>
GuildId::delete_sticker
insteadmodel
only.Delete 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>
Available on crate feature model
only.
pub async fn to_sticker(self, http: impl AsRef<Http>) -> Result<Sticker>
model
only.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
insteadAvailable on crate feature model
only.
pub async fn edit( self, cache_http: impl CacheHttp, guild_id: impl Into<GuildId>, builder: EditSticker<'_> ) -> Result<Sticker>
GuildId::edit_sticker
insteadmodel
only.Edits 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 PartialEq for StickerId
impl PartialEq for StickerId
source§impl PartialOrd for StickerId
impl PartialOrd for StickerId
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for StickerId
impl Eq for StickerId
impl StructuralPartialEq for StickerId
Auto Trait Implementations§
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,
§type Err = <T as FromStr>::Err
type Err = <T as FromStr>::Err
utils
and client
only.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,
utils
and client
only.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> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.