#[cfg(feature = "model")]
use super::sticker_url;
#[cfg(feature = "model")]
use crate::http::Http;
#[cfg(feature = "model")]
use crate::internal::prelude::*;
use crate::model::prelude::*;
#[derive(Clone, Debug, Deserialize, Serialize)]
#[non_exhaustive]
pub struct StickerItem {
pub id: StickerId,
pub name: String,
pub format_type: StickerFormatType,
}
#[cfg(feature = "model")]
impl StickerItem {
#[inline]
pub async fn to_sticker(&self, http: impl AsRef<Http>) -> Result<Sticker> {
self.id.to_sticker(&http).await
}
#[inline]
#[must_use]
pub fn image_url(&self) -> Option<String> {
sticker_url(self.id, self.format_type)
}
}