pycord icon indicating copy to clipboard operation
pycord copied to clipboard

SlashCommand.mention doesn't work for command groups

Open tiltowait opened this issue 3 years ago • 1 comments

Summary

The SlashCommand.mention property does not create a proper mention when used in a command group.

Reproduction Steps

  1. Create a command group
  2. Inside the subcommand, output ctx.command.mention.

Minimal Reproducible Code

Within a cog:

group = SlashCommandGroup("group", "test group")

@group.command(name="command")
async def group_command(self, ctx):
    await ctx.respond(ctx.command.mention)

Expected Results

The response should have a mention to the command used.

Actual Results

The output is </group command:None>.

Intents

N/A

System Information

  • Python v3.10.6-final
  • py-cord v2.1.1-final
  • aiohttp v3.8.1
  • system info: Darwin 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000

Checklist

  • [X] I have searched the open issues for duplicates.
  • [X] I have shown the entire traceback, if possible.
  • [X] I have removed my token from display, if visible.

Additional Context

No response

tiltowait avatar Aug 26 '22 17:08 tiltowait

Can confirm

JustaSqu1d avatar Aug 26 '22 19:08 JustaSqu1d

wanted to tackle this issue but the bug seems to be already fixed on #1672

Makiyu-py avatar Oct 08 '22 04:10 Makiyu-py