AllowedMentions class

Allowed Mentions structure

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.

https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mentions-structure

Annotations
  • @JsonSerializable(includeIfNull: false)

Constructors

AllowedMentions({List<AllowedMentionType>? parse, List<String>? roles, List<String>? users, bool? repliedUser})
Constructor
AllowedMentions.fromJson(Map<String, dynamic> json)
From json
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
parse List<AllowedMentionType>?
An array of allowed mention types to parse from the content.
final
repliedUser bool?
For replies, whether to mention the author of the message being replied to (default false)
final
roles List<String>?
Array of role_ids to mention (Max size of 100)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
users List<String>?
Array of user_ids to mention (Max size of 100)
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
To json
toString() String
A string representation of this object.
inherited

Operators

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