Creates a new Message instance.
The client instance.
The raw data for the message from the API.
Optionalattachments?: Optionalcontent?: null | stringOptionaledited?: null | stringOptionalembeds?: Optionalflags?: numberFormat: uint32
Bitfield of message flags
https://docs.rs/revolt-models/latest/revolt_models/v0/enum.MessageFlags.html
Optionalinteractions?: { reactions?: null | string[]; restrict_reactions?: boolean }Optionalreactions?: null | string[]Optionalrestrict_reactions?: booleanOptionalmasquerade?: null | { avatar?: null | string; colour?: null | string; name?: null | string }Optionalmember?: Optionalmentions?: null | string[]Optionalnonce?: null | stringOptionalpinned?: null | booleanOptionalreactions?: { [key: string]: string[] }Optionalreplies?: null | string[]Optionalrole_mentions?: null | string[]Optionalsystem?: Optionaluser?: Optionalwebhook?: null | { avatar?: null | string; name: string }An array of file attachments included in the message.
Optionaldeleted?: null | booleanOptionalmessage_id?: null | stringOptionalobject_id?: null | stringOptionalreported?: null | booleanOptionalserver_id?: null | stringFormat: int
Optionaluser_id?: null | stringThe ID of the user who authored the message.
The ID of the channel where the message was sent.
ReadonlyclientThe client instance.
The content of the message.
The timestamp of when the message was last edited, or null if not edited.
An array of embeds included in the message.
Optionalcolour?: null | stringOptionaldescription?: null | stringOptionalicon_url?: null | stringOptionalimage?: null | { height: number; size: "Large" | "Preview"; url: string; width: number }Optionaloriginal_url?: null | stringOptionalsite_name?: null | stringOptionalspecial?: Optionaltitle?: null | stringOptionalurl?: null | stringOptionalvideo?: null | { height: number; url: string; width: number }Format: uint
Format: uint
Format: uint
Format: uint
Optionalcolour?: null | stringOptionaldescription?: null | stringOptionalicon_url?: null | stringOptionalmedia?: Optionaltitle?: null | stringOptionalurl?: null | stringThe unique identifier for the object.
OptionalmasqueradeMasquerade information for the message, Name and / or avatar override information
Optionalavatar?: null | stringOptionalcolour?: null | stringOptionalname?: null | stringMentions included in the message.
the reactions and count on a message
The type of the message (e.g., TEXT, SYSTEM).
Retrieves the author of the message.
The user who authored the message, or null if not found.
Retrieves the channel where the message was sent.
The channel instance.
Gets the creation timestamp of the message in milliseconds.
The timestamp of when the message was created.
Gets the date when the message was last edited.
The date of the last edit, or null if not edited.
Retrieves the server member who authored the message, if any.
The server member instance, or null if not found.
Retrieves the server associated with the message, if any.
The server instance, or null if not found.
Retrieves the server ID associated with the message, if any.
The server ID, or null if the message is not in a server.
Checks if the message is a system message.
true if the message is a system message, otherwise false.
Gets the URL of the message.
The URL of the message.
Creates a deep clone of the object.
A clone of the object.
Updates the object with new data and returns a clone of the object.
The data to update the object with.
Optionalclear: string[]Fields to clear in the object.
A clone of the updated object.
Acknowledges the message.
A promise that resolves when the message is acknowledged.
Adds a reaction to the message.
The emoji to react with.
A promise that resolves when the reaction is added.
Edits the message.
The new content or edit options.
A promise that resolves when the message is edited.
Compares this object with another to determine if they are equal.
Optionalobj: null | MessageStructThe object to compare with.
true if the objects are equal, otherwise false.
Fetches the latest data for the message.
A promise that resolves with the updated message instance.
Checks if the message is in a server.
true if the message is in a server, otherwise false.
Removes all reactions from the message.
A promise that resolves when all reactions are removed.
Removes a reaction from the message.
The emoji to remove the reaction for.
Optionaloptions: { remove_all?: boolean; user_id?: string }Options for removing the reaction.
Optionalremove_all?: booleanWhether to remove all of the specified reaction for the message.
Optionaluser_id?: stringThe user ID to remove the reaction for. If not provided, removes the reaction for the current user.
A promise that resolves when the reaction is removed.
Replies to the message.
The content of the reply.
Optionalmention: boolean = trueWhether to mention the original message author.
A promise that resolves with the sent reply message.
Converts the message to a string representation.
The content of the message.
Represents a message in a channel.