DiscordLua
discorddiscord
v1.2.4
Install

TextBasedChannel

channel
On 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.

channel Module 1.2.4 Source

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

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

Returns

any.

Example

lua
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

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

Returns

any.

Example

lua
local discord = require("discord")
-- object is a TextBasedChannel
object:awaitMessages(...)

TextBasedChannel:bulkDelete()

#

Delete many messages in this channel through REST.

Signature

TextBasedChannel:bulkDelete(...)

Parameters

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

Returns

any.

Example

lua
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

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

Returns

any.

Example

lua
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

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

Returns

any.

Example

lua
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

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

Returns

any.

Example

lua
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

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

Returns

any.

Example

lua
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

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

Returns

any.

Example

lua
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

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

Returns

any.

Example

lua
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

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

Returns

any.

Example

lua
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

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

Returns

any.

Example

lua
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

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

Returns

any.

Example

lua
local discord = require("discord")
-- object is a TextBasedChannel
object:send(...)

TextBasedChannel:sendTyping()

#

Send Typing using this TextBasedChannel.

Signature

TextBasedChannel:sendTyping(...)

Parameters

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

Returns

any.

Example

lua
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

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

Returns

any.

Example

lua
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

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

Returns

any.

Example

lua
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

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

Returns

any.

Example

lua
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

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

Returns

any.

Example

lua
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

Search Ctrl K Navigate Open Esc