From d9f85c37d6721af80146d4ea790310b9f5440ba1 Mon Sep 17 00:00:00 2001 From: JustaSqu1d Date: Mon, 25 Jul 2022 09:42:33 -0700 Subject: [PATCH] feat: Slash Command Mentions --- discord/commands/core.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/discord/commands/core.py b/discord/commands/core.py index e0d2022aed..f0372ee373 100644 --- a/discord/commands/core.py +++ b/discord/commands/core.py @@ -586,6 +586,8 @@ class SlashCommand(ApplicationCommand): parent: Optional[:class:`SlashCommandGroup`] The parent group that this command belongs to. ``None`` if there isn't one. + mention: :class:`str` + Returns a string that allows you to mention the slash command. guild_only: :class:`bool` Whether the command should only be usable inside a guild. default_member_permissions: :class:`~discord.Permissions` @@ -757,7 +759,11 @@ def _is_typing_optional(self, annotation): @property def is_subcommand(self) -> bool: return self.parent is not None - + + @property + def mention(self) -> str: + return f"" + def to_dict(self) -> Dict: as_dict = { "name": self.name,