Nostrum.Api.Sticker (nostrum v0.11.0-dev)

View Source

Functions for interacting with the Discord API's sticker endpoints.

See: https://discord.com/developers/docs/resources/sticker

Summary

Functions

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

create(guild_id, name, description, tags, file, reason \\ nil)

(since 1.x.x)

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 of name (file name) and body (file data).
  • reason (optional): audit log reason to attach to this event

Returns

Returns a Nostrum.Struct.Sticker.t/0 on success.

delete(guild_id, sticker_id)

(since 1.x.x)

Delete a guild sticker with the specified ID.

get(sticker_id)

(since 1.x.x)

Fetch a sticker with the provided ID.

Returns a Nostrum.Struct.Sticker.t/0.

get(guild_id, sticker_id)

(since 1.x.x)

Return the specified sticker from the specified guild.

Returns a Nostrum.Struct.Sticker.t/0.

list(guild_id)

(since 1.x.x)

List all stickers in the provided guild.

Returns a list of Nostrum.Struct.Sticker.t/0.

modify(guild_id, sticker_id, options)

(since 1.x.x)

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.

pack(id)

(since 1.x.x)

Fetch a sticker pack with the provided ID.

Returns a Nostrum.Struct.Sticker.Pack.t/0.

packs()

(since 1.x.x)
@spec packs() :: {:ok, [Nostrum.Struct.Sticker.Pack.t()]} | Nostrum.Api.error()

Get a list of available sticker packs.