View Source Nostrum.Api.Sticker (Nostrum v0.10.4)

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

Link to this function

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

View Source (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.

Link to this function

delete(guild_id, sticker_id)

View Source (since 1.x.x)

Delete a guild sticker with the specified ID.

Link to this function

get(sticker_id)

View Source (since 1.x.x)

Fetch a sticker with the provided ID.

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

Link to this function

get(guild_id, sticker_id)

View Source (since 1.x.x)

Return the specified sticker from the specified guild.

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

Link to this function

list(guild_id)

View Source (since 1.x.x)

List all stickers in the provided guild.

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

Link to this function

modify(guild_id, sticker_id, options)

View Source (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.

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.