Skip to content

Commit 33efae0

Browse files
committed
do not mention on replies by default
1 parent 28b789c commit 33efae0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

core/context.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, TypeAlias
3+
from typing import Any, TYPE_CHECKING, TypeAlias
44

55
import discord
66
from discord.ext import commands
@@ -46,6 +46,13 @@ def author_is_mod(self) -> bool:
4646
roles = member._roles # type: ignore # we know this won't change for a while
4747
return roles.has(Roles.ADMIN) or roles.has(Roles.MODERATOR)
4848

49+
@discord.utils.copy_doc(commands.Context.reply) # type: ignore
50+
async def reply(self, content: str | None = None, **kwargs: Any) -> discord.Message:
51+
if "mention_author" not in kwargs:
52+
kwargs["mention_author"] = False
53+
54+
return await super().reply(content, **kwargs)
55+
4956

5057
class GuildContext(Context):
5158
guild: discord.Guild # type: ignore # type lie due to narrowing

0 commit comments

Comments
 (0)