Nostrum.Api.Sticker (nostrum v0.11.0-dev)
View SourceFunctions for interacting with the Discord API's sticker endpoints.
Summary
Functions
Create a sticker in a guild.
Delete a guild sticker with the specified ID.
Fetch a sticker with the provided ID.
Return the specified sticker from the specified guild.
List all stickers in the provided guild.
Modify a guild sticker with the specified ID.
Fetch a sticker pack with the provided ID.
Get a list of available sticker packs.
Functions
@spec create( Nostrum.Struct.Guild.id(), Nostrum.Struct.Sticker.name(), Nostrum.Struct.Sticker.description(), Nostrum.Struct.Sticker.tags(), String.t() | %{body: iodata(), name: String.t()}, Nostrum.Struct.Guild.AuditLogEntry.reason() ) :: {:ok, Nostrum.Struct.Sticker.t()} | Nostrum.Api.error()
Create a sticker in a guild.
Every guild has five free sticker slots by default, and each Boost level will grant access to more slots.
Uploaded stickers are constrained to 5 seconds in length for animated stickers, and 320 x 320 pixels.
Stickers in the Lottie file format can only
be uploaded on guilds that have either the VERIFIED
and/or the PARTNERED
guild feature.
Parameters
name
: Name of the sticker (2-30 characters)description
: Description of the sticker (2-100 characters)tags
: Autocomplete/suggestion tags for the sticker (max 200 characters)file
: A path to a file to upload or a map ofname
(file name) andbody
(file data).reason
(optional): audit log reason to attach to this event
Returns
Returns a Nostrum.Struct.Sticker.t/0
on success.
@spec delete(Nostrum.Struct.Guild.id(), Nostrum.Struct.Sticker.id()) :: {:ok} | Nostrum.Api.error()
Delete a guild sticker with the specified ID.
@spec get(Nostrum.Struct.Sticker.id()) :: {:ok, Nostrum.Struct.Sticker.t()} | Nostrum.Api.error()
Fetch a sticker with the provided ID.
Returns a Nostrum.Struct.Sticker.t/0
.
@spec get(Nostrum.Struct.Guild.id(), Nostrum.Struct.Sticker.id()) :: Nostrum.Struct.Sticker.t() | Nostrum.Api.error()
Return the specified sticker from the specified guild.
Returns a Nostrum.Struct.Sticker.t/0
.
@spec list(Nostrum.Struct.Guild.id()) :: {:ok, [Nostrum.Struct.Sticker.t()]} | Nostrum.Api.error()
List all stickers in the provided guild.
Returns a list of Nostrum.Struct.Sticker.t/0
.
@spec modify(Nostrum.Struct.Guild.id(), Nostrum.Struct.Sticker.id(), %{ name: Nostrum.Struct.Sticker.name() | nil, description: Nostrum.Struct.Sticker.description() | nil, tags: Nostrum.Struct.Sticker.tags() | nil }) :: {:ok, Nostrum.Struct.Sticker.t()} | Nostrum.Api.error()
Modify a guild sticker with the specified ID.
Pass in a map of properties to update, with any of the following keys:
name
: Name of the sticker (2-30 characters)description
: Description of the sticker (2-100 characters)tags
: Autocomplete/suggestion tags for the sticker (max 200 characters)
Returns an updated sticker on update completion.
@spec pack(Nostrum.Snowflake.t()) :: {:ok, Nostrum.Struct.Sticker.Pack.t()} | Nostrum.Api.error()
Fetch a sticker pack with the provided ID.
Returns a Nostrum.Struct.Sticker.Pack.t/0
.
@spec packs() :: {:ok, [Nostrum.Struct.Sticker.Pack.t()]} | Nostrum.Api.error()
Get a list of available sticker packs.