MessageMentions

export class MessageMentions<InGuild extends boolean = boolean>
export class MessageMentions<InGuild extends boolean = boolean>
Keeps track of mentions in a Message.
NameConstraintsOptionalDefaultDescription
InGuildbooleanYesbooleanNone
Readonly
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
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.
has(data, options?):boolean
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.
NameTypeOptionalDescription
dataUserResolvable | RoleResolvable | ChannelResolvableNoThe User/Role/Channel to check for
optionsMessageMentionsHasOptionsYesThe options for the check
toJSON():unknown