-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
It is possible to have the bot send a message containing mentions, but without actually pinging the users or roles mentioned. It is also possible to disable at-everyone/at-here and reply-to-user pings.
This means there's no need to edit the mentions in after-the-fact, or use embeds specifically to avoid pings.
However, this requires an allowed_mentions
parameter to be passed in with every Context.send()
or Context.reply()
call:
await ctx.send("Some message", allowed_mentions=AllowedMentions.none())
This behaviour can be configured globally for the bot by default, but it cannot be configured at the extension level.
A more succinct solution might be to wrap all send/reply calls in a method that supplies the allowed_mentions
by default:
async def reply(self, ctx: GuildContext, content: str):
"""Wraps `Context.reply()` with some extension-default boilerplate."""
await ctx.reply(
content,
allowed_mentions=AllowedMentions.none(),
)
Such a method can be defined and adjusted per-extension.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request