DiscordLua
discorddiscord
v1.2.4
Install

CategoryChannelChildManager

Manager
On 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.

manager Module 1.2.4 Source

Constructor

CategoryChannelChildManager.new(client, channel)

The class table is callable, so CategoryChannelChildManager(client, channel) is the same as .new.

NameTypeRequiredBehavior
client any required Passed through to the implementation as written.
channel any required Passed through to the implementation as written.
lua
local discord = require("discord")
local object = discord.CategoryChannelChildManager({}, {})

Properties

CategoryChannelChildManager.cache

# readonly
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

CategoryChannelChildManager.channel

# readonly
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.

CategoryChannelChildManager.client

# readonly
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

NameTypeRequiredBehavior
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

lua
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

NameTypeRequiredBehavior
id string required Snowflake id string.

Returns

CategoryChannelChildManager — the same instance, for chaining.

Example

lua
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

lua
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

lua
local discord = require("discord")
-- object is a CategoryChannelChildManager
object:sync()

Examples

lua
local discord = require("discord")
local object = discord.CategoryChannelChildManager({})

ApplicationCommandManager · ApplicationCommandPermissionsManager · ApplicationEmojiManager · AutoModerationRuleManager · BaseGuildEmojiManager · BaseManager · CachedManager · ChannelManager

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc