Sticker
ClassOn this page
Sticker is a DiscordLua class representing a Discord resource. Obtain it from a manager, an event payload, or the constructor when one is documented below.
Properties
- Name
available- Type
any- Access
- readonly
- Description
- Instance field
Sticker.available. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Sticker.
- Name
client- Type
any- Access
- readonly
- Description
- Owning Client instance used for REST, cache, and event dispatch.
- Availability
- Populated from the Gateway/REST payload or constructor for this Sticker.
- Name
description- Type
any- Access
- readonly
- Description
- Instance field
Sticker.description. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Sticker.
- Name
format- Type
any- Access
- readonly
- Description
- Instance field
Sticker.format. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Sticker.
- Name
formatType- Type
any- Access
- readonly
- Description
- Instance field
Sticker.formatType. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Sticker.
- Name
guildId- Type
any- Access
- readonly
- Description
- Instance field
Sticker.guildId. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Sticker.
- Name
id- Type
any- Access
- readonly
- Description
- Snowflake id of this Sticker.
- Availability
- Populated from the Gateway/REST payload or constructor for this Sticker.
- Name
name- Type
any- Access
- readonly
- Description
- Display name of this Sticker.
- Availability
- Populated from the Gateway/REST payload or constructor for this Sticker.
- Name
packId- Type
any- Access
- readonly
- Description
- Instance field
Sticker.packId. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Sticker.
- Name
partial- Type
any- Access
- readonly
- Description
- Instance field
Sticker.partial. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Sticker.
- Name
raw- Type
any- Access
- readonly
- Description
- Instance field
Sticker.raw. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Sticker.
- Name
sortValue- Type
any- Access
- readonly
- Description
- Instance field
Sticker.sortValue. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Sticker.
- Name
tags- Type
any- Access
- readonly
- Description
- Instance field
Sticker.tags. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Sticker.
- Name
type- Type
any- Access
- readonly
- Description
- Instance field
Sticker.type. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Sticker.
Methods
Sticker:createdAt()
#Create dAt through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
Sticker:createdAt() Parameters
No parameters.
Returns
Sticker — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Sticker
object:createdAt()Sticker:createdTimestamp()
#Create dTimestamp through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
Sticker:createdTimestamp() Parameters
No parameters.
Returns
Sticker — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Sticker
object:createdTimestamp()Sticker:delete()
#Permanently delete this resource through REST.
Signature
Sticker:delete(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Sticker — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Sticker
object:delete(function(err, result)
if err then error(err) end
end)Sticker:edit()
#Apply a REST update to this resource.
Signature
Sticker:edit(options, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
options |
table |
optional | Lua option table. Field names match the corresponding DiscordLua option type when one exists. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Sticker — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Sticker
object:edit({}, function(err, result)
if err then error(err) end
end)Sticker:equals()
#Return whether this Sticker refers to the same resource as the argument.
Signature
Sticker:equals(other) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
other |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a Sticker
object:equals(other)Sticker:fetch()
#Request a fresh copy of this resource from REST and update the cache.
Signature
Sticker:fetch(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Sticker — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Sticker
object:fetch(function(err, result)
if err then error(err) end
end)Sticker:fetchPack()
#Fetch Pack from REST and update the local cache when the request succeeds.
Signature
Sticker:fetchPack(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Sticker — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Sticker
object:fetchPack(function(err, result)
if err then error(err) end
end)Sticker:fetchUser()
#Fetch User from REST and update the local cache when the request succeeds.
Signature
Sticker:fetchUser(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Sticker — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Sticker
object:fetchUser(function(err, result)
if err then error(err) end
end)Sticker:guild()
#Performs guild on this Sticker. Call it from bot code when you need that operation on the current object.
Signature
Sticker:guild() Parameters
No parameters.
Returns
Sticker — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Sticker
object:guild()Sticker:imageURL()
#Performs image url on this Sticker. Call it from bot code when you need that operation on the current object.
Signature
Sticker:imageURL() Parameters
No parameters.
Returns
Sticker — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Sticker
object:imageURL()Sticker:toJSON()
#Serialize this Sticker into a Lua table suitable for REST or debugging.
Signature
Sticker:toJSON() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Sticker
object:toJSON()Sticker:url()
#Performs url on this Sticker. Call it from bot code when you need that operation on the current object.
Signature
Sticker:url() Parameters
No parameters.
Returns
Sticker — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Sticker
object:url()Examples
Obtain this object from a manager, wrap helper, or event payload — it is not constructed directly in typical bot code.
Related APIs
ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationRoleConnectionMetadata · Attachment
Version: discord 1.2.4 · runtime 1.0.0