DiscordLua
discorddiscord
v1.2.4
Install

GuildTextThreadManager

Manager
On this page

GuildTextThreadManager is the cache and REST facade for GuildTextThread objects owned by the parent. Typical calls are fetch, create, edit, delete, resolve, and resolveId.

manager Module 1.2.4 Source

Constructor

GuildTextThreadManager.new(client, channel)

The class table is callable, so GuildTextThreadManager(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.GuildTextThreadManager({}, {})

Properties

GuildTextThreadManager.cache

# readonly
Name
cache
Type
Collection
Access
readonly
Description
In-memory Collection of cached objects owned by this GuildTextThreadManager.
Availability
Populated from the Gateway/REST payload or constructor for this GuildTextThreadManager.
Related
Collection

GuildTextThreadManager.channel

# readonly
Name
channel
Type
any
Access
readonly
Description
Channel this GuildTextThreadManager belongs to, when resolved from cache.
Availability
Populated from the Gateway/REST payload or constructor for this GuildTextThreadManager.

GuildTextThreadManager.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 GuildTextThreadManager.

Methods

GuildTextThreadManager:create()

#

Create a new resource through REST and cache the result.

Signature

GuildTextThreadManager: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

GuildTextThreadManager — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a GuildTextThreadManager
object:create({}, function(err, result)
    if err then error(err) end
end)

GuildTextThreadManager:fetch()

#

Request a fresh copy of this resource from REST and update the cache.

Signature

GuildTextThreadManager:fetch(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

GuildTextThreadManager — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a GuildTextThreadManager
object:fetch({}, function(err, result)
    if err then error(err) end
end)

Examples

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

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

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc