DiscordMessage
DiscordMessage represents a message in a Discord channel, providing methods to reply, delete, pin, unpin, edit, and manage reactions.
Properties
mentionRoles
tts
mentionEveryone
nonce
id
author
username: string,
globalName: string,
avatar: string,
id: string,
publicFlags: number,
discriminator: string,
}
content
mentions
flags
timestamp
type
pinned
guildId
channelId
member
Methods
crosspostAsync
Crossposts the message in an Announcement Channel to all following channels.
replyAsync
Replies to the message asynchronously.
startThreadAsync
DiscordMessage : startThreadAsync () -> Vendor.Future<string>
name: string
autoArchiveDuration:: number
rateLimitPerUser:: number?
Start a thread from the current message object.
deleteAsync
Deletes the message asynchronously.
pinAsync
Pins the message asynchronously.
unpinAsync
Unpins the message asynchronously.
editAsync
Edits the message asynchronously.
addReactionAsync
Adds a reaction to the message asynchronously.
removeReactionAsync
Removes a reaction from the message asynchronously.
removeUserReactionAsync
DiscordMessage : removeUserReactionAsync () -> Vendor.Future<unknown>
userId: string
reaction: string
Removes a reaction from a specific user on the message asynchronously.
getReactionsAsync
Gets the reactions on the message asynchronously.
removeAllReactionsAsync
Removes all reactions from the message asynchronously.
removeAllReactionsForEmojiAsync
Removes all reactions for a specific emoji from the message asynchronously.
Functions
new
DiscordMessage . new () -> ()
discordClient: any
messageData: table
Creates a new instance of DiscordMessage.