disagreement/docs/mentions.md
Slipstream f58ffe8321
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
Apply global allowed_mentions setting (#76)
2025-06-13 22:10:19 -06:00

845 B

Controlling Mentions

The client exposes settings to control how mentions behave in outgoing messages.

Default Allowed Mentions

Use the allowed_mentions parameter of :class:disagreement.Client to set a default for all messages:

from disagreement.models import AllowedMentions
client = disagreement.Client(
    token="YOUR_TOKEN",
    allowed_mentions=AllowedMentions.none().to_dict(),
)

When Client.send_message or convenience methods like Message.reply and CommandContext.reply are called without an explicit allowed_mentions argument this value will be used.

AllowedMentions also provides the convenience methods AllowedMentions.none() and AllowedMentions.all() to quickly create common configurations.

Next Steps