CategoryChannelChildManager
ManagerOn this page
CategoryChannelChildManager is the cache and REST facade for CategoryChannelChild objects owned by the parent. Typical calls are fetch, create, edit, delete, resolve, and resolveId.
Constructor
CategoryChannelChildManager.new(client, channel) The class table is callable, so CategoryChannelChildManager(client, channel) is the same as .new.
| Name | Type | Required | Behavior |
|---|---|---|---|
client |
any |
required | Passed through to the implementation as written. |
channel |
any |
required | Passed through to the implementation as written. |
local discord = require("discord")
local object = discord.CategoryChannelChildManager({}, {})Properties
- Name
cache- Type
- Collection
- Access
- readonly
- Description
- In-memory Collection of cached objects owned by this CategoryChannelChildManager.
- Availability
- Populated from the Gateway/REST payload or constructor for this CategoryChannelChildManager.
- Related
- Collection
- Name
channel- Type
any- Access
- readonly
- Description
- Channel this CategoryChannelChildManager belongs to, when resolved from cache.
- Availability
- Populated from the Gateway/REST payload or constructor for this CategoryChannelChildManager.
- 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 CategoryChannelChildManager.
Methods
CategoryChannelChildManager:create()
#Create a new resource through REST and cache the result.
Signature
CategoryChannelChildManager: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
CategoryChannelChildManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a CategoryChannelChildManager
object:create({}, function(err, result)
if err then error(err) end
end)CategoryChannelChildManager:get()
#Performs get on this CategoryChannelChildManager. Call it from bot code when you need that operation on the current object.
Signature
CategoryChannelChildManager:get(id) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
id |
string |
required | Snowflake id string. |
Returns
CategoryChannelChildManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a CategoryChannelChildManager
object:get("123")CategoryChannelChildManager:guild()
#Performs guild on this CategoryChannelChildManager. Call it from bot code when you need that operation on the current object.
Signature
CategoryChannelChildManager:guild() Parameters
No parameters.
Returns
CategoryChannelChildManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a CategoryChannelChildManager
object:guild()CategoryChannelChildManager:sync()
#Performs sync on this CategoryChannelChildManager. Call it from bot code when you need that operation on the current object.
Signature
CategoryChannelChildManager:sync() Parameters
No parameters.
Returns
CategoryChannelChildManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a CategoryChannelChildManager
object:sync()Examples
local discord = require("discord")
local object = discord.CategoryChannelChildManager({})Related APIs
ApplicationCommandManager · ApplicationCommandPermissionsManager · ApplicationEmojiManager · AutoModerationRuleManager · BaseGuildEmojiManager · BaseManager · CachedManager · ChannelManager
Version: discord 1.2.4 · runtime 1.0.0