无论大小如何,我如何使命令工作。 discord.py?

How do I make the command work regardless of the case. discord.py?

无论大小写如何使命令正常工作?也就是说,用户可以编写 !Teama、!TeamA、!TEAMa 等命令应该仍然有效? https://i.stack.imgur.com/AZfzB.png

这是我的代码:

a = "asd"
@client.command(pass_context=True)
async def teama(ctx):
    await ctx.send(a)

您只需在声明机器人时指定它:

bot = commands.Bot(command_prefix='!', case_insensitive=True)