AllowedMentions class

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

AllowedMentions()

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 everyone: false, bool users: false, bool roles: false}) → void
Allow @everyone and @here if everyone is true Allow @user if users is true Allow @role if roles 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
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited