DiscordLua
discorddiscord
v1.2.4
Install

Message

Class
On this page

Message is a chat message. Reply, edit, delete, pin, and react through instance methods, or read content, author, and channel.

class Module 1.2.4 Source

Properties

Message.activity

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

Message.applicationId

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

Message.attachments

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

Message.author

# readonly
Name
author
Type
User
Access
readonly
Description
User that created this Message.
Availability
Populated from the Gateway/REST payload or constructor for this Message.
Related
User

Message.call

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

Message.channel

# readonly
Name
channel
Type
any
Access
readonly
Description
Channel this Message belongs to, when resolved from cache.
Availability
Populated from the Gateway/REST payload or constructor for this Message.

Message.channelId

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

Message.client

# readonly
Name
client
Type
any
Access
readonly
Description
Owning Client instance used for REST, cache, and event dispatch.
Availability
Populated from the Gateway/REST payload or constructor for this Message.

Message.components

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

Message.content

# readonly
Name
content
Type
any
Access
readonly
Description
Text content of this Message.
Availability
Populated from the Gateway/REST payload or constructor for this Message.

Message.editedTimestamp

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

Message.embeds

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

Message.flags

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

Message.groupActivityApplication

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

Message.guild

# readonly
Name
guild
Type
any
Access
readonly
Description
Guild this Message belongs to, when the payload included a guild id.
Availability
Populated from the Gateway/REST payload or constructor for this Message.

Message.guildId

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

Message.id

# readonly
Name
id
Type
any
Access
readonly
Description
Snowflake id of this Message.
Availability
Populated from the Gateway/REST payload or constructor for this Message.

Message.interaction

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

Message.interactionMetadata

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

Message.member

# readonly
Name
member
Type
Member
Access
readonly
Description
Guild member view of the user, when the event occurred in a guild.
Availability
Populated from the Gateway/REST payload or constructor for this Message.
Related
Member

Message.mentionEveryone

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

Message.mentions

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

Message.messageSnapshots

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

Message.nonce

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

Message.partial

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

Message.pinned

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

Message.poll

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

Message.position

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

Message.raw

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

Message.reactions

# readonly
Name
reactions
Type
ReactionManager
Access
readonly
Description
Cache and REST facade for reaction objects owned by this Message. Use it to fetch, create, resolve, and mutate those resources.
Availability
Created in Message.new and remains valid for the lifetime of the Message.
Related
ReactionManager

Message.reference

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

Message.referencedMessage

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

Message.resolved

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

Message.roleSubscriptionData

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

Message.sharedClientTheme

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

Message.stickers

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

Message.system

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

Message.thread

# readonly
Name
thread
Type
any
Access
readonly
Description
Instance field Message.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 Message.

Message.timestamp

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

Message.tts

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

Message.type

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

Message.webhookId

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

Methods

Message:after()

#

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

Signature

Message:after(successText)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:after(successText)

Message:awaitMessageComponent()

#

Performs await message component on this Message. Call it from bot code when you need that operation on the current object.

Signature

Message:awaitMessageComponent(options, callback)

Parameters

NameTypeRequiredBehavior
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

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:awaitMessageComponent({}, function(err, result)
    if err then error(err) end
end)

Message:awaitReactions()

#

Performs await reactions on this Message. Call it from bot code when you need that operation on the current object.

Signature

Message:awaitReactions(options, callback)

Parameters

NameTypeRequiredBehavior
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

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:awaitReactions({}, function(err, result)
    if err then error(err) end
end)

Message:bulkDeletable()

#

Performs bulk deletable on this Message. Call it from bot code when you need that operation on the current object.

Signature

Message:bulkDeletable()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:bulkDeletable()

Message:cleanContent()

#

Performs clean content on this Message. Call it from bot code when you need that operation on the current object.

Signature

Message:cleanContent()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:cleanContent()

Message:createdAt()

#

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

Signature

Message:createdAt()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:createdAt()

Message:createdTimestamp()

#

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

Signature

Message:createdTimestamp()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:createdTimestamp()

Message:createMessageComponentCollector()

#

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

Signature

Message:createMessageComponentCollector(options)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

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

Message:createReactionCollector()

#

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

Signature

Message:createReactionCollector(options)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:createReactionCollector({})

Message:crosspost()

#

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

Signature

Message:crosspost()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:crosspost()

Message:crosspostable()

#

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

Signature

Message:crosspostable()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:crosspostable()

Message:deletable()

#

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

Signature

Message:deletable()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:deletable()

Message:delete()

#

Permanently delete this resource through REST.

Signature

Message:delete(callback)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

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

Message:edit()

#

Apply a REST update to this resource.

Signature

Message:edit(contentOrOptions, callback)

Parameters

NameTypeRequiredBehavior
contentOrOptions 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

Message — the same instance, for chaining.

Example

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

Message:editable()

#

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

Signature

Message:editable()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

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

Message:editedAt()

#

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

Signature

Message:editedAt()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:editedAt()

Message:equals()

#

Return whether this Message refers to the same resource as the argument.

Signature

Message:equals(other)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:equals(other)

Message:fetch()

#

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

Signature

Message:fetch(callback)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

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

Message:fetchReference()

#

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

Signature

Message:fetchReference(callback)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

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

Message:fetchWebhook()

#

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

Signature

Message:fetchWebhook(callback)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

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

Message:forward()

#

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

Signature

Message:forward(channel)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:forward(channel)

Message:hasThread()

#

Performs has thread on this Message. Call it from bot code when you need that operation on the current object.

Signature

Message:hasThread()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:hasThread()

Message:inGuild()

#

Predicate that returns whether this Message matches inGuild. Use it to branch before calling type-specific methods.

Signature

Message:inGuild()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:inGuild()

Message:pin()

#

Pin this message in its channel.

Signature

Message:pin(callback)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

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

Message:pinnable()

#

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

Signature

Message:pinnable()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:pinnable()

Message:react()

#

Add an emoji reaction to this message.

Signature

Message:react(emoji)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:react(emoji)

Message:removeAttachments()

#

Remove Attachments from this Message.

Signature

Message:removeAttachments()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:removeAttachments()

Message:reply()

#

Send a message in the same channel as a reply to this object.

Signature

Message:reply(contentOrOptions, callback)

Parameters

NameTypeRequiredBehavior
contentOrOptions 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

Message — the same instance, for chaining.

Example

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

Message:replyEmbed()

#

Performs reply embed on this Message. Call it from bot code when you need that operation on the current object.

Signature

Message:replyEmbed(text, color)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:replyEmbed(text, color)

Message:replyError()

#

Performs reply error on this Message. Call it from bot code when you need that operation on the current object.

Signature

Message:replyError(text)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:replyError(text)

Message:replySuccess()

#

Performs reply success on this Message. Call it from bot code when you need that operation on the current object.

Signature

Message:replySuccess(text)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:replySuccess(text)

Message:requireGuild()

#

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

Signature

Message:requireGuild()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:requireGuild()

Message:resolveComponent()

#

Performs resolve component on this Message. Call it from bot code when you need that operation on the current object.

Signature

Message:resolveComponent(customId)

Parameters

NameTypeRequiredBehavior
customId string required Snowflake id string.

Returns

any.

Example

lua
local discord = require("discord")
-- object is a Message
object:resolveComponent("123")

Message:resolveTarget()

#

Performs resolve target on this Message. Call it from bot code when you need that operation on the current object.

Signature

Message:resolveTarget(args, options)

Parameters

NameTypeRequiredBehavior
args any required Passed through to the implementation as written.
options table optional Lua option table. Field names match the corresponding DiscordLua option type when one exists.

Returns

any.

Example

lua
local discord = require("discord")
-- object is a Message
object:resolveTarget(args, {})

Message:resolveUser()

#

Performs resolve user on this Message. Call it from bot code when you need that operation on the current object.

Signature

Message:resolveUser(args)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:resolveUser(args)

Message:resolveUserId()

#

Performs resolve user id on this Message. Call it from bot code when you need that operation on the current object.

Signature

Message:resolveUserId(args)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:resolveUserId(args)

Message:startThread()

#

Performs start thread on this Message. Call it from bot code when you need that operation on the current object.

Signature

Message:startThread(options)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:startThread({})

Message:suppressEmbeds()

#

Performs suppress embeds on this Message. Call it from bot code when you need that operation on the current object.

Signature

Message:suppressEmbeds(suppress)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:suppressEmbeds(suppress)

Message:toJSON()

#

Serialize this Message into a Lua table suitable for REST or debugging.

Signature

Message:toJSON()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:toJSON()

Message:toString()

#

function toString() { [native code] }

Signature

Message:toString()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:toString()

Message:unpin()

#

Remove this message from the channel pin list.

Signature

Message:unpin(callback)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

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

Message:unreact()

#

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

Signature

Message:unreact(emoji)

Parameters

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

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:unreact(emoji)

Message:url()

#

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

Signature

Message:url()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:url()

Message:valueOf()

#

function valueOf() { [native code] }

Signature

Message:valueOf()

Parameters

No parameters.

Returns

Message — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Message
object:valueOf()

Examples

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

ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationRoleConnectionMetadata · Attachment

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc