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

29 lines
769 B
Markdown

# 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:
```python
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
- [Commands](commands.md)
- [HTTP Client Options](http_client.md)