TextBasedChannel
channelOn this page
TextBasedChannel is a DiscordLua channel representing a Discord resource. Obtain it from a manager, an event payload, or the constructor when one is documented below.
Methods
TextBasedChannel:awaitMessageComponent()
#Performs await message component on this TextBasedChannel. Call it from bot code when you need that operation on the current object.
Signature
TextBasedChannel:awaitMessageComponent(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:awaitMessageComponent(...)TextBasedChannel:awaitMessages()
#Performs await messages on this TextBasedChannel. Call it from bot code when you need that operation on the current object.
Signature
TextBasedChannel:awaitMessages(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:awaitMessages(...)TextBasedChannel:bulkDelete()
#Delete many messages in this channel through REST.
Signature
TextBasedChannel:bulkDelete(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:bulkDelete(...)TextBasedChannel:createInteractionCollector()
#Create InteractionCollector through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
TextBasedChannel:createInteractionCollector(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:createInteractionCollector(...)TextBasedChannel:createMessageCollector()
#Create MessageCollector through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
TextBasedChannel:createMessageCollector(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:createMessageCollector(...)TextBasedChannel:createMessageComponentCollector()
#Create MessageComponentCollector through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
TextBasedChannel:createMessageComponentCollector(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:createMessageComponentCollector(...)TextBasedChannel:createWebhook()
#Create Webhook through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.
Signature
TextBasedChannel:createWebhook(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:createWebhook(...)TextBasedChannel:fetchMessages()
#Fetch Messages from REST and update the local cache when the request succeeds.
Signature
TextBasedChannel:fetchMessages(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:fetchMessages(...)TextBasedChannel:fetchWebhooks()
#Fetch Webhooks from REST and update the local cache when the request succeeds.
Signature
TextBasedChannel:fetchWebhooks(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:fetchWebhooks(...)TextBasedChannel:lastMessage()
#Performs last message on this TextBasedChannel. Call it from bot code when you need that operation on the current object.
Signature
TextBasedChannel:lastMessage(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:lastMessage(...)TextBasedChannel:lastPinAt()
#Performs last pin at on this TextBasedChannel. Call it from bot code when you need that operation on the current object.
Signature
TextBasedChannel:lastPinAt(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:lastPinAt(...)TextBasedChannel:send()
#Send a message, payload, or packet using this object.
Signature
TextBasedChannel:send(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:send(...)TextBasedChannel:sendTyping()
#Send Typing using this TextBasedChannel.
Signature
TextBasedChannel:sendTyping(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:sendTyping(...)TextBasedChannel:setNSFW()
#Set the NSFW field. Builders return this TextBasedChannel so setters can be chained.
Signature
TextBasedChannel:setNSFW(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:setNSFW(...)TextBasedChannel:setRateLimitPerUser()
#Set the RateLimitPerUser field. Builders return this TextBasedChannel so setters can be chained.
Signature
TextBasedChannel:setRateLimitPerUser(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:setRateLimitPerUser(...)TextBasedChannel:setSlowmode()
#Set the Slowmode field. Builders return this TextBasedChannel so setters can be chained.
Signature
TextBasedChannel:setSlowmode(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:setSlowmode(...)TextBasedChannel:startTyping()
#Performs start typing on this TextBasedChannel. Call it from bot code when you need that operation on the current object.
Signature
TextBasedChannel:startTyping(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a TextBasedChannel
object:startTyping(...)Examples
Obtain this object from a manager, wrap helper, or event payload — it is not constructed directly in typical bot code.
Version: discord 1.2.4 · runtime 1.0.0