class AllowedMentionsBuilder
implements
JSONEncodable<APIAllowedMentions>export declare class AllowedMentionsBuilder implements JSONEncodable<APIAllowedMentions>A builder that creates API-compatible JSON data for allowed mentions.
addRoles(...roles: RestOrArray<Snowflake>) : this
...roles: RestOrArray<Snowflake>
Adds roles to mention.
addUsers(...users: RestOrArray<Snowflake>) : this
...users: RestOrArray<Snowflake>
Adds users to mention.
setParse(...parse: RestOrArray<AllowedMentionsTypes>) : this
...parse: RestOrArray<AllowedMentionsTypes>
Sets the types of mentions to parse from the content.
setRepliedUser(repliedUser?: boolean) : this
repliedUser?: boolean
For replies, sets whether to mention the author of the message being replied to.
setRoles(...roles: RestOrArray<Snowflake>) : this
...roles: RestOrArray<Snowflake>
Sets the roles to mention.
setUsers(...users: RestOrArray<Snowflake>) : this
...users: RestOrArray<Snowflake>
Sets the users to mention.
Removes, replaces, or inserts roles.
Examples:Remove the first role:Remove the first n roles:Remove the last role:
allowedMentions.spliceRoles(0, 1);const n = 4;
allowedMentions.spliceRoles(0, n);allowedMentions.spliceRoles(-1, 1);Removes, replaces, or inserts users.
Examples:Remove the first user:Remove the first n users:Remove the last user:
allowedMentions.spliceUsers(0, 1);const n = 4;
allowedMentions.spliceUsers(0, n);allowedMentions.spliceUsers(-1, 1); toJSON(validationOverride?: boolean) : APIAllowedMentions
validationOverride?: boolean
Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.