AllowedMentions class Null safety

The allowed mention field allows for more granular control over mentions without various hacks to the message content. This will always validate against message content to avoid phantom pings (e.g. to ping everyone, you must still have @everyone in the message content), and check against user/bot permissions.

If class is only instantiated without any modifications to its fields, by default it will suppress all mentions.





hashCode int
The hash code for this object.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


allow({bool? reply, bool? everyone, bool? users, bool? roles}) → void
Allow @everyone and @here if everyone is true Allow @user if users is true Allow @role if roles is true Mention the user on reply if reply is true
build() RawApiMap
Returns built response for api
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
suppressRole(Snowflake roleId) → void
Suppress mentioning specific role by its id
suppressRoles(Iterable<Snowflake> roleIds) → void
Suppress mentioning multiple roles by their ids
suppressUser(Snowflake userId) → void
Suppress mentioning specific user by its id
suppressUsers(Iterable<Snowflake> userIds) → void
Suppress mentioning multiple users by their ids
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.