Robiot
Robiot

Reputation: 98

Discord.py Change Name Of Command Without Changing The Function Name

I have this which kinda works

@commands.command(aliases=['8ball'])
    async def _8ball(self, ctx):
        foo()

Except when I run the help command it tells the function name (_8ball)

So what I want is to call it with "8ball" and not "_8ball" and that it shows "8ball" instead of "_8ball" in help

Upvotes: 0

Views: 707

Answers (1)

Łukasz Kwieciński
Łukasz Kwieciński

Reputation: 15689

Pass the name keyword-argument into the decorator

@bot.command(name="8ball")
async def _8ball(self, ctx):
    ...

Upvotes: 1

Related Questions