ForumChannel
channelOn this page
ForumChannel is a DiscordLua channel representing a Discord resource. Obtain it from a manager, an event payload, or the constructor when one is documented below.
- ForumChannel
- GuildChannel
- 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 ChannelMethods
ForumChannel:create()
#Create a new resource through REST and cache the result.
Signature
ForumChannel: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
ForumChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ForumChannel
object:create({}, function(err, result)
if err then error(err) end
end)ForumChannel:setAvailableTags()
#Set the AvailableTags field. Builders return this ForumChannel so setters can be chained.
Signature
ForumChannel:setAvailableTags(tags) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
tags |
any |
required | Passed through to the implementation as written. |
Returns
ForumChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ForumChannel
object:setAvailableTags(tags)ForumChannel:setDefaultForumLayout()
#Set the DefaultForumLayout field. Builders return this ForumChannel so setters can be chained.
Signature
ForumChannel:setDefaultForumLayout(layout) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
layout |
any |
required | Passed through to the implementation as written. |
Returns
ForumChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ForumChannel
object:setDefaultForumLayout(layout)ForumChannel:setDefaultReactionEmoji()
#Set the DefaultReactionEmoji field. Builders return this ForumChannel so setters can be chained.
Signature
ForumChannel:setDefaultReactionEmoji(emoji) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
emoji |
any |
required | Passed through to the implementation as written. |
Returns
ForumChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ForumChannel
object:setDefaultReactionEmoji(emoji)ForumChannel:setDefaultSortOrder()
#Set the DefaultSortOrder field. Builders return this ForumChannel so setters can be chained.
Signature
ForumChannel:setDefaultSortOrder(order) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
order |
any |
required | Passed through to the implementation as written. |
Returns
ForumChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ForumChannel
object:setDefaultSortOrder(order)ForumChannel:setDefaultThreadRateLimitPerUser()
#Set the DefaultThreadRateLimitPerUser field. Builders return this ForumChannel so setters can be chained.
Signature
ForumChannel:setDefaultThreadRateLimitPerUser(seconds) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
seconds |
any |
required | Passed through to the implementation as written. |
Returns
ForumChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ForumChannel
object:setDefaultThreadRateLimitPerUser(seconds)ForumChannel:threads()
#Performs threads on this ForumChannel. Call it from bot code when you need that operation on the current object.
Signature
ForumChannel:threads(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
ForumChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ForumChannel
object:threads(function(err, result)
if err then error(err) end
end)Inherited methods (53)
Channel:addFollowerChannel:awaitMessageComponentChannel:awaitMessagesChannel:bulkDeleteChannel:cloneChannel:createdAtChannel:createdTimestampChannel:createInteractionCollectorChannel:createInviteChannel:createMessageCollectorChannel:createMessageComponentCollectorChannel:createWebhookChannel:deletableChannel:deleteChannel:editChannel:equalsChannel:fetchChannel:fetchInvitesChannel:fetchMessagesChannel:fetchWebhooksChannel:guildChannel:iconURLChannel:isDMBasedChannel:isSendableChannel:isTextBasedChannel:isThreadChannel:isThreadOnlyChannel:isVoiceBasedChannel:lastMessageChannel:lastPinAtChannel:lockPermissionsChannel:manageableChannel:parentChannel:partialChannel:permissionsForChannel:permissionsLockedChannel:rawPositionChannel:sendChannel:sendTypingChannel:setDefaultAutoArchiveDurationChannel:setNameChannel:setNSFWChannel:setParentChannel:setPositionChannel:setRateLimitPerUserChannel:setSlowmodeChannel:setTopicChannel:setTypeChannel:startTypingChannel:toJSONChannel:toStringChannel:urlChannel:viewableExamples
Obtain this object from a manager, wrap helper, or event payload — it is not constructed directly in typical bot code.
Related APIs
BaseGuildTextChannel · BaseGuildVoiceChannel · CategoryChannel · Channel · DirectoryChannel · DMChannel · GuildChannel · MediaChannel
Version: discord 1.2.4 · runtime 1.0.0