Skip to content

DiscordMessage

DiscordMessage represents a message in a Discord channel, providing methods to reply, delete, pin, unpin, edit, and manage reactions.

Properties

mentionRoles

DiscordMessage.mentionRoles  :: { string }

tts

DiscordMessage.tts  :: boolean

mentionEveryone

DiscordMessage.mentionEveryone  :: boolean

nonce

DiscordMessage.nonce  :: string

id

DiscordMessage.id  :: string

author

DiscordMessage.author  :: {
       username: string,
       globalName: string,
       avatar: string,
       id: string,
       publicFlags: number,
       discriminator: string,
    }

content

DiscordMessage.content  :: string

mentions

DiscordMessage.mentions  :: { string }

flags

DiscordMessage.flags  :: string

timestamp

DiscordMessage.timestamp  :: string

type

DiscordMessage.type  :: number

pinned

DiscordMessage.pinned  :: boolean

guildId

DiscordMessage.guildId  :: string

channelId

DiscordMessage.channelId  :: string

member

DiscordMessage.member  :: {
       flags: number,
       deaf: boolean,
       roles: { [string],
    }

Methods

crosspostAsync

DiscordMessage : crosspostAsync ()  -> Vendor.Future<Objects.DiscordMessage>

Crossposts the message in an Announcement Channel to all following channels.

replyAsync

DiscordMessage : replyAsync (

     messageBuilder: MessageBuilder
)  -> Vendor.Future<unknown>

Replies to the message asynchronously.

startThreadAsync

DiscordMessage : startThreadAsync (

     name: string
     autoArchiveDuration:: number
     rateLimitPerUser:: number?
)  -> Vendor.Future<string>

Start a thread from the current message object.

deleteAsync

DiscordMessage : deleteAsync ()  -> Vendor.Future<unknown>

Deletes the message asynchronously.

pinAsync

DiscordMessage : pinAsync ()  -> Vendor.Future<unknown>

Pins the message asynchronously.

unpinAsync

DiscordMessage : unpinAsync ()  -> Vendor.Future<unknown>

Unpins the message asynchronously.

editAsync

DiscordMessage : editAsync (

     messageBuilder: MessageBuilder
)  -> Vendor.Future<unknown>

Edits the message asynchronously.

addReactionAsync

DiscordMessage : addReactionAsync (

     reaction: string
)  -> Vendor.Future<unknown>

Adds a reaction to the message asynchronously.

removeReactionAsync

DiscordMessage : removeReactionAsync (

     reaction: string
)  -> Vendor.Future<unknown>

Removes a reaction from the message asynchronously.

removeUserReactionAsync

DiscordMessage : removeUserReactionAsync (

     userId: string
     reaction: string
)  -> Vendor.Future<unknown>

Removes a reaction from a specific user on the message asynchronously.

getReactionsAsync

DiscordMessage : getReactionsAsync (

     reaction: string
)  -> Vendor.Future<unknown>

Gets the reactions on the message asynchronously.

removeAllReactionsAsync

DiscordMessage : removeAllReactionsAsync ()  -> Vendor.Future<unknown>

Removes all reactions from the message asynchronously.

removeAllReactionsForEmojiAsync

DiscordMessage : removeAllReactionsForEmojiAsync (

     reaction: string
)  -> Vendor.Future<unknown>

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.