Mentions

discord_http.mentions module

class discord_http.mentions.AllowedMentions(*, everyone=True, users=True, roles=True, replied_user=True)

Bases: object

Represents the allowed mentions for a message.

Parameters:
everyone

Whether to allow @everyone and @here mentions

Type:

bool

users

Whether to allow user mentions, or a list of user IDs to allow mentions for

Type:

bool | list[Snowflake | int] | None

roles

Whether to allow role mentions, or a list of role IDs to allow mentions for

Type:

bool | list[Snowflake | int] | None

reply_user

Whether to mention the author of the message being replied to

Type:

bool

classmethod all() Self

Preset to allow all mentions.

Return type:

Self

classmethod none() Self

Preset to deny any mentions.

Return type:

Self

to_dict() dict

Representation of the AllowedMentions that is Discord API friendly.

Return type:

dict