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: bool

Whether to allow @everyone and @here mentions.

users: bool | list[Snowflake | int] | None

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

roles: bool | list[Snowflake | int] | None

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

reply_user: bool

Whether to mention the author of the message being replied to.

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