Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApplicationCommand mention #1564

Closed
LuisWollenschneider opened this issue Aug 14, 2022 · 1 comment
Closed

ApplicationCommand mention #1564

LuisWollenschneider opened this issue Aug 14, 2022 · 1 comment
Labels
feature request New feature request

Comments

@LuisWollenschneider
Copy link
Contributor

Summary

Add mention parameter to ApplicationCommand

What is the feature request for?

The core library

The Problem

There is no easy way to properly highlight an ApplicationCommand in a message.

The markdown has the format
</COMMAND_NAME:APPLICATION_ID>

The Ideal Solution

The solution would be to have a mention attribute for ApplicationCommands.

@bot.application_command()
async def command(ctx: ApplicationContext):
    await ctx.respond(ctx.command.mention)

The Current Solution

The best way currently is to craft the markdown by hand every time.

@bot.application_command()
async def command(ctx: ApplicationContext):
    await ctx.respond(f"</{ctx.command.name}:{ctx.bot.application_id}>")

Additional Context

As far as I see, the application_id is not accessible within the ApplicationCommand class, which is necessary for the markdown.

@LuisWollenschneider LuisWollenschneider added the feature request New feature request label Aug 14, 2022
@ghost
Copy link

ghost commented Aug 14, 2022

This was addressed in PR #1523 and has been added to the source code ever since

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request
Projects
None yet
Development

No branches or pull requests

2 participants