我有一个命令:
@bot.command(pass_context=True)
async def hellothere(ctx):
await Bot.say("Hello {}".format(ctx.message.author))
我想复制一个更短的命令。
我试过:
@bot.command(pass_context=True)
async def hello(ctx):
hellothere(ctx)
但是我收到一条错误消息,指出
Command
不可调用。有谁知道如何做到这一点?
最佳答案
@client.command(pass_context = True , aliases=['purge', 'clean', 'delete'])
只需更改别名。
关于python - 如何给一个命令多个名称?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50204867/