ApplicationEmojiManager
ManagerOn this page
ApplicationEmojiManager is the cache and REST facade for ApplicationEmoji objects owned by the parent. Typical calls are fetch, create, edit, delete, resolve, and resolveId.
Constructor
ApplicationEmojiManager.new(client, application) The class table is callable, so ApplicationEmojiManager(client, application) is the same as .new.
| Name | Type | Required | Behavior |
|---|---|---|---|
client |
any |
required | Passed through to the implementation as written. |
application |
any |
required | Passed through to the implementation as written. |
local discord = require("discord")
local object = discord.ApplicationEmojiManager({}, {})Properties
- Name
application- Type
any- Access
- readonly
- Description
- Application object for the logged-in bot, available after ready.
- Availability
- Populated from the Gateway/REST payload or constructor for this ApplicationEmojiManager.
Methods
ApplicationEmojiManager:create()
#Create a new resource through REST and cache the result.
Signature
ApplicationEmojiManager:create(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
ApplicationEmojiManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ApplicationEmojiManager
object:create({}, function(err, result)
if err then error(err) end
end)ApplicationEmojiManager:delete()
#Permanently delete this resource through REST.
Signature
ApplicationEmojiManager:delete(id, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
id |
string |
required | Snowflake id string. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
ApplicationEmojiManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ApplicationEmojiManager
object:delete("123", function(err, result)
if err then error(err) end
end)ApplicationEmojiManager:edit()
#Apply a REST update to this resource.
Signature
ApplicationEmojiManager:edit(id, options, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
id |
string |
required | Snowflake id string. |
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
ApplicationEmojiManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ApplicationEmojiManager
object:edit("123", {}, function(err, result)
if err then error(err) end
end)ApplicationEmojiManager:fetch()
#Request a fresh copy of this resource from REST and update the cache.
Signature
ApplicationEmojiManager:fetch(id, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
id |
string |
required | Snowflake id string. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
ApplicationEmojiManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ApplicationEmojiManager
object:fetch("123", function(err, result)
if err then error(err) end
end)ApplicationEmojiManager:fetchAuthor()
#Fetch Author from REST and update the local cache when the request succeeds.
Signature
ApplicationEmojiManager:fetchAuthor(emoji, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
emoji |
any |
required | Passed through to the implementation as written. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
ApplicationEmojiManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ApplicationEmojiManager
object:fetchAuthor(emoji, function(err, result)
if err then error(err) end
end)Examples
local discord = require("discord")
local object = discord.ApplicationEmojiManager({})Related APIs
ApplicationCommandManager · ApplicationCommandPermissionsManager · AutoModerationRuleManager · BaseGuildEmojiManager · BaseManager · CachedManager · CategoryChannelChildManager · ChannelManager
Version: discord 1.2.4 · runtime 1.0.0