DiscordLua
discorddiscord
v1.2.4
Install

ThreadMemberManager

Manager
On this page

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

manager Module 1.2.4 REST Source

Constructor

ThreadMemberManager.new(client, thread)

The class table is callable, so ThreadMemberManager(client, thread) is the same as .new.

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

Properties

ThreadMemberManager.thread

# readonly
Name
thread
Type
any
Access
readonly
Description
Instance field ThreadMemberManager.thread. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ThreadMemberManager.

Methods

ThreadMemberManager:add()

#

Add an item to this ThreadMemberManager.

Signature

ThreadMemberManager:add(user)

Parameters

NameTypeRequiredBehavior
user any required Passed through to the implementation as written.

Returns

ThreadMemberManager — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadMemberManager
object:add(user)

ThreadMemberManager:fetch()

#

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

Signature

ThreadMemberManager:fetch(userId, callback)

Parameters

NameTypeRequiredBehavior
userId string required Snowflake id string.
callback function optional Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error.

Returns

ThreadMemberManager — the same instance, for chaining.

Example

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

ThreadMemberManager:fetchMe()

#

Fetch Me from REST and update the local cache when the request succeeds.

Signature

ThreadMemberManager:fetchMe(callback)

Parameters

NameTypeRequiredBehavior
callback function optional Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error.

Returns

ThreadMemberManager — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadMemberManager
object:fetchMe(function(err, result)
    if err then error(err) end
end)

ThreadMemberManager:me()

#

Performs me on this ThreadMemberManager. Call it from bot code when you need that operation on the current object.

Signature

ThreadMemberManager:me()

Parameters

No parameters.

Returns

ThreadMemberManager — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadMemberManager
object:me()

ThreadMemberManager:path()

#

Performs path on this ThreadMemberManager. Call it from bot code when you need that operation on the current object.

Signature

ThreadMemberManager:path(userId)

Parameters

NameTypeRequiredBehavior
userId string required Snowflake id string.

Returns

ThreadMemberManager — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadMemberManager
object:path("123")

ThreadMemberManager:remove()

#

Remove an item from this ThreadMemberManager.

Signature

ThreadMemberManager:remove(user)

Parameters

NameTypeRequiredBehavior
user any required Passed through to the implementation as written.

Returns

ThreadMemberManager — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadMemberManager
object:remove(user)

Examples

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

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

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc