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.
- Implemented types
Constructors
Properties
- 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
Methods
-
allow(
{bool? reply, bool? everyone, bool? users, bool? roles}) → void -
Allow @everyone and @here if
everyone
is true Allow @user ifusers
is true Allow @role ifroles
is true -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
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. [...]
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited