小编cro*_*sap的帖子

如何给命令多个名称?

我有一个命令:

@bot.command(pass_context=True)
async def hellothere(ctx):
   await Bot.say("Hello {}".format(ctx.message.author))
Run Code Online (Sandbox Code Playgroud)

我想复制此命令,使其更短。

我试过了:

@bot.command(pass_context=True)
async def hello(ctx):
   hellothere(ctx)
Run Code Online (Sandbox Code Playgroud)

但是我收到一条错误消息,指出该错误Command不可调用。

有谁知道如何做到这一点?

python discord discord.py

0
推荐指数
1
解决办法
1471
查看次数

标签 统计

discord ×1

discord.py ×1

python ×1