GuildEmojiRoleManager
ManagerOn this page
GuildEmojiRoleManager is the cache and REST facade for GuildEmojiRole objects owned by the parent. Typical calls are fetch, create, edit, delete, resolve, and resolveId.
Constructor
GuildEmojiRoleManager.new(client, emoji, roleIds) The class table is callable, so GuildEmojiRoleManager(client, emoji, roleIds) is the same as .new.
| Name | Type | Required | Behavior |
|---|---|---|---|
client |
any |
required | Passed through to the implementation as written. |
emoji |
any |
required | Passed through to the implementation as written. |
roleIds |
any |
required | Passed through to the implementation as written. |
local discord = require("discord")
local object = discord.GuildEmojiRoleManager({}, {}, {})Properties
- Name
cache- Type
- Collection
- Access
- readonly
- Description
- In-memory Collection of cached objects owned by this GuildEmojiRoleManager.
- Availability
- Populated from the Gateway/REST payload or constructor for this GuildEmojiRoleManager.
- Related
- Collection
- 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 GuildEmojiRoleManager.
- Name
emoji- Type
any- Access
- readonly
- Description
- Instance field
GuildEmojiRoleManager.emoji. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this GuildEmojiRoleManager.
- Name
guild- Type
any- Access
- readonly
- Description
- Guild this GuildEmojiRoleManager belongs to, when the payload included a guild id.
- Availability
- Populated from the Gateway/REST payload or constructor for this GuildEmojiRoleManager.
Methods
GuildEmojiRoleManager:add()
#Add an item to this GuildEmojiRoleManager.
Signature
GuildEmojiRoleManager:add(role, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
role |
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
GuildEmojiRoleManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a GuildEmojiRoleManager
object:add(role, function(err, result)
if err then error(err) end
end)GuildEmojiRoleManager:remove()
#Remove an item from this GuildEmojiRoleManager.
Signature
GuildEmojiRoleManager:remove(role, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
role |
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
GuildEmojiRoleManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a GuildEmojiRoleManager
object:remove(role, function(err, result)
if err then error(err) end
end)GuildEmojiRoleManager:set()
#Performs set on this GuildEmojiRoleManager. Call it from bot code when you need that operation on the current object.
Signature
GuildEmojiRoleManager:set(roles, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
roles |
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
GuildEmojiRoleManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a GuildEmojiRoleManager
object:set(roles, function(err, result)
if err then error(err) end
end)Examples
local discord = require("discord")
local object = discord.GuildEmojiRoleManager({})Related APIs
ApplicationCommandManager · ApplicationCommandPermissionsManager · ApplicationEmojiManager · AutoModerationRuleManager · BaseGuildEmojiManager · BaseManager · CachedManager · CategoryChannelChildManager
Version: discord 1.2.4 · runtime 1.0.0