#[non_exhaustive]pub struct AllowedMentions {
pub parse: Vec<AllowedMentionType>,
pub roles: Vec<RoleId>,
pub users: Vec<UserId>,
pub replied_user: bool,
}Expand description
Which mentions of a message notify their targets, when sending.
Mentions are always rendered; this only controls the notifications. The default (everything empty) notifies nobody. When the field is absent from a request, Discord notifies every mention in regular messages, and only users in interaction responses and webhook messages.
The permissions still apply: roles notify only if they are mentionable or the bot has
MENTION_EVERYONE, which is also needed for @everyone and @here.
discord.js counterpart: MessageMentionOptions (allowedMentions).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parse: Vec<AllowedMentionType>The mention types to parse from the content. Do not combine
Users with users (or
Roles with roles): Discord rejects it.
roles: Vec<RoleId>The roles that may be notified (max 100).
users: Vec<UserId>The users that may be notified (max 100).
replied_user: boolWhether the author of the replied-to message is notified.