MessageMentions
classe · Source
Keeps track of mentions in a Message.
Properties
everyone
Whether @everyone or @here were mentioned Source
users
Any users that were mentioned Order as received from the API, not as they appear in the message content Source
roles
Any roles that were mentioned Order as received from the API, not as they appear in the message content Source
_members
nullable · private
Cached members for MessageMentions#membersSource
_channels
nullable · private
Cached channels for MessageMentions#channelsSource
_parsedUsers
nullable · private
Cached users for MessageMentions#parsedUsersSource
crosspostedChannels
A collection of crossposted channels Order as received from the API, not as they appear in the message content Source
repliedUser
nullable
The author of the message that this message is a reply to Source
members
readonly · nullable
Any members that were mentioned (only in Guilds) Order as received from the API, not as they appear in the message content Source
channels
readonly
Any channels that were mentioned Order as they appear first in the message content Source
parsedUsers
readonly
Any user mentions that were included in the message content Order as they appear first in the message content Source
EVERYONE_PATTERN
static
Regular expression that globally matches @everyone and @hereSource
USERS_PATTERN
static
Regular expression that globally matches user mentions like <@81440962496172032>Source
ROLES_PATTERN
static
Regular expression that globally matches role mentions like <@&297577916114403338>Source
CHANNELS_PATTERN
static
Regular expression that globally matches channel mentions like <#222079895583457280>Source
Methods
has
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. Parameters
| Name | Type | Description |
|---|---|---|
data | UserResolvable | RoleResolvable | ChannelResolvable | The User/Role/Channel to check for |
options? | MessageMentionsHasOptions | The options for the check |
Returns: booleanSource