grom/sticker
Types
pub type ContentType {
Png
Apng
Lottie
Gif
}
Constructors
-
Png -
Apng -
Lottie -
Gif
pub type File {
File(
name: String,
content_type: ContentType,
content: BitArray,
)
}
Constructors
-
File(name: String, content_type: ContentType, content: BitArray)
pub type Item {
Item(id: String, name: String, format_type: ContentType)
}
Constructors
-
Item(id: String, name: String, format_type: ContentType)
pub type Pack {
Pack(
id: String,
stickers: List(Sticker),
name: String,
sku_id: String,
cover_sticker_id: option.Option(String),
description: String,
banner_asset_id: option.Option(String),
)
}
Constructors
-
Pack( id: String, stickers: List(Sticker), name: String, sku_id: String, cover_sticker_id: option.Option(String), description: String, banner_asset_id: option.Option(String), )
pub type Sticker {
Sticker(
id: String,
pack_id: option.Option(String),
name: String,
description: option.Option(String),
tags: String,
type_: Type,
format_type: ContentType,
is_available: option.Option(Bool),
guild_id: option.Option(String),
user: option.Option(user.User),
sort_value: option.Option(Int),
)
}
Constructors
-
Sticker( id: String, pack_id: option.Option(String), name: String, description: option.Option(String), tags: String, type_: Type, format_type: ContentType, is_available: option.Option(Bool), guild_id: option.Option(String), user: option.Option(user.User), sort_value: option.Option(Int), )
Values
pub fn get(
client: grom.Client,
id sticker_id: String,
) -> Result(Sticker, grom.Error)
pub fn get_pack(
client: grom.Client,
id pack_id: String,
) -> Result(Pack, grom.Error)
pub fn get_packs(
client: grom.Client,
) -> Result(List(Pack), grom.Error)
pub fn request(
id id: String,
format format: ContentType,
) -> request.Request(String)
You CANNOT convert between formats. If the sticker you’re requesting has a content type of PNG, you must request it as a PNG. Additionally, please note that Lottie files are text (JSON), not binary.