disagreement/docs/mentions.md
Slipstream 0a3f680e7f
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
Add AllowedMentions helpers and update docs (#73)
2025-06-11 18:24:09 -06:00

769 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 is 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