Preview deployment

class MessageMentions

export class MessageMentions<InGuild extends boolean = boolean>

Keeps track of mentions in a Message.

Type Parameters

optional
InGuild? extends boolean = boolean

readonly
channels : Collection<Snowflake, Channel>

Any channels that were mentioned Order as they appear first in the message content

static
ChannelsPattern : typeof FormattingPatterns.Channel

A regular expression that matches channel mentions like <#222079895583457280>. The id group property is present on the exec result of this expression.

readonly
client : Client

crosspostedChannels : Collection<Snowflake, CrosspostedChannel>

A collection of crossposted channels Order as received from the API, not as they appear in the message content

everyone : boolean

Whether @everyone or @here were mentioned

static
EveryonePattern : RegExp

A regular expression that matches @everyone and @here. The mention group property is present on the exec result of this expression.

readonly
guild : If<InGuild, Guild>

readonly
members : If<InGuild, Collection<Snowflake, GuildMember>>

Any members that were mentioned (only in Guilds) Order as received from the API, not as they appear in the message content

readonly
parsedUsers : Collection<Snowflake, User>

Any user mentions that were included in the message content Order as they appear first in the message content

repliedUser : User | null

The author of the message that this message is a reply to

Any roles that were mentioned Order as received from the API, not as they appear in the message content

static
RolesPattern : typeof FormattingPatterns.Role

A regular expression that matches role mentions like <@&297577916114403338>. The id group property is present on the exec result of this expression.

Any users that were mentioned Order as received from the API, not as they appear in the message content

static
UsersPattern : typeof FormattingPatterns.User

A regular expression that matches user mentions like <@81440962496172032>. The id group property is present on the exec result of this expression.

Checks if a user, guild member, thread member, role, or channel is mentioned. Takes into account user mentions, role mentions, channel mentions, replied user mention, and @everyone/@here mentions.

toJSON() : unknown