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.

Inheritance

Constructors

AllowedMentions()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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
build() RawApiMap
Returns built response for api
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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