DiscordLua
discorddiscord
v1.2.4
Install

ThreadChannel

channel
On this page

ThreadChannel is a DiscordLua channel representing a Discord resource. Obtain it from a manager, an event payload, or the constructor when one is documented below.

channel Module 1.2.4 Source
Inheritance
  1. ThreadChannel
  2. GuildChannel
  3. Channel
Inherited properties (45)
appliedTags · inherited from Channelarchived · inherited from ChannelarchiveTimestamp · inherited from ChannelautoArchiveDuration · inherited from ChannelavailableTags · inherited from Channelbitrate · inherited from Channelchildren · inherited from Channelclient · inherited from ChanneldefaultAutoArchiveDuration · inherited from ChanneldefaultForumLayout · inherited from ChanneldefaultReactionEmoji · inherited from ChanneldefaultSortOrder · inherited from ChanneldefaultThreadRateLimitPerUser · inherited from Channelflags · inherited from ChannelguildId · inherited from Channelicon · inherited from Channelid · inherited from Channelinvitable · inherited from Channelinvites · inherited from ChannellastMessageId · inherited from ChannellastPinTimestamp · inherited from Channellocked · inherited from ChannelmemberCount · inherited from Channelmembers · inherited from ChannelmessageCount · inherited from Channelmessages · inherited from Channelname · inherited from Channelnsfw · inherited from ChannelownerId · inherited from ChannelparentId · inherited from ChannelpermissionOverwrites · inherited from Channelposition · inherited from ChannelrateLimitPerUser · inherited from Channelraw · inherited from Channelrecipient · inherited from ChannelrecipientId · inherited from ChannelrecipientIds · inherited from Channelrecipients · inherited from ChannelrtcRegion · inherited from Channelthreads · inherited from Channeltopic · inherited from ChanneltotalMessageSent · inherited from Channeltype · inherited from ChanneluserLimit · inherited from ChannelvideoQualityMode · inherited from Channel

Methods

ThreadChannel:archivedAt()

#

Performs archived at on this ThreadChannel. Call it from bot code when you need that operation on the current object.

Signature

ThreadChannel:archivedAt()

Parameters

No parameters.

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:archivedAt()

ThreadChannel:createMessageComponentCollector()

#

Create MessageComponentCollector through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.

Signature

ThreadChannel:createMessageComponentCollector(options)

Parameters

NameTypeRequiredBehavior
options table optional Lua option table. Field names match the corresponding DiscordLua option type when one exists.

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:createMessageComponentCollector({})

ThreadChannel:editable()

#

Apply a REST update to able and refresh the local object when the request succeeds.

Signature

ThreadChannel:editable()

Parameters

No parameters.

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:editable()

ThreadChannel:fetchMembers()

#

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

Signature

ThreadChannel:fetchMembers(callback)

Parameters

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

Returns

ThreadChannel — the same instance, for chaining.

Example

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

ThreadChannel:fetchOwner()

#

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

Signature

ThreadChannel:fetchOwner(callback)

Parameters

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

Returns

ThreadChannel — the same instance, for chaining.

Example

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

ThreadChannel:fetchStarterMessage()

#

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

Signature

ThreadChannel:fetchStarterMessage(callback)

Parameters

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

Returns

ThreadChannel — the same instance, for chaining.

Example

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

ThreadChannel:guildMembers()

#

Performs guild members on this ThreadChannel. Call it from bot code when you need that operation on the current object.

Signature

ThreadChannel:guildMembers()

Parameters

No parameters.

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:guildMembers()

ThreadChannel:join()

#

Join the voice channel represented by this object.

Signature

ThreadChannel:join()

Parameters

No parameters.

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:join()

ThreadChannel:joinable()

#

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

Signature

ThreadChannel:joinable()

Parameters

No parameters.

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:joinable()

ThreadChannel:joined()

#

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

Signature

ThreadChannel:joined()

Parameters

No parameters.

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:joined()

ThreadChannel:leave()

#

Leave the associated voice connection.

Signature

ThreadChannel:leave()

Parameters

No parameters.

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:leave()

ThreadChannel:pin()

#

Pin this message in its channel.

Signature

ThreadChannel:pin()

Parameters

No parameters.

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:pin()

ThreadChannel:sendable()

#

Send able using this ThreadChannel.

Signature

ThreadChannel:sendable()

Parameters

No parameters.

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:sendable()

ThreadChannel:setAppliedTags()

#

Set the AppliedTags field. Builders return this ThreadChannel so setters can be chained.

Signature

ThreadChannel:setAppliedTags(tags)

Parameters

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

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:setAppliedTags(tags)

ThreadChannel:setArchived()

#

Set the Archived field. Builders return this ThreadChannel so setters can be chained.

Signature

ThreadChannel:setArchived(archived)

Parameters

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

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:setArchived(archived)

ThreadChannel:setAutoArchiveDuration()

#

Set the AutoArchiveDuration field. Builders return this ThreadChannel so setters can be chained.

Signature

ThreadChannel:setAutoArchiveDuration(duration)

Parameters

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

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:setAutoArchiveDuration(duration)

ThreadChannel:setInvitable()

#

Set the Invitable field. Builders return this ThreadChannel so setters can be chained.

Signature

ThreadChannel:setInvitable(invitable)

Parameters

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

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:setInvitable(invitable)

ThreadChannel:setLocked()

#

Set the Locked field. Builders return this ThreadChannel so setters can be chained.

Signature

ThreadChannel:setLocked(locked)

Parameters

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

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:setLocked(locked)

ThreadChannel:unarchivable()

#

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

Signature

ThreadChannel:unarchivable()

Parameters

No parameters.

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:unarchivable()

ThreadChannel:unpin()

#

Remove this message from the channel pin list.

Signature

ThreadChannel:unpin()

Parameters

No parameters.

Returns

ThreadChannel — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ThreadChannel
object:unpin()
Inherited methods (52)

Examples

Obtain this object from a manager, wrap helper, or event payload — it is not constructed directly in typical bot code.

BaseGuildTextChannel · BaseGuildVoiceChannel · CategoryChannel · Channel · DirectoryChannel · DMChannel · ForumChannel · GuildChannel

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc