GuildTextThreadManager
ManagerOn 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.
Constructor
GuildTextThreadManager.new(client, channel) The class table is callable, so GuildTextThreadManager(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.GuildTextThreadManager({}, {})Properties
- 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
- 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.
- 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
| 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
GuildTextThreadManager — the same instance, for chaining.
Example
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
| 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
GuildTextThreadManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a GuildTextThreadManager
object:fetch({}, function(err, result)
if err then error(err) end
end)Examples
local discord = require("discord")
local object = discord.GuildTextThreadManager({})Related APIs
ApplicationCommandManager · ApplicationCommandPermissionsManager · ApplicationEmojiManager · AutoModerationRuleManager · BaseGuildEmojiManager · BaseManager · CachedManager · CategoryChannelChildManager
Version: discord 1.2.4 · runtime 1.0.0