How to make a command case insensitive in discord.py

前端 未结 3 1010
长发绾君心
长发绾君心 2020-12-19 06:49

How would one make a command case-insensitive without adding many aliases for different capitalizations like this:

@bot.command(pass_context = True, name = \         


        
3条回答
  •  清歌不尽
    2020-12-19 07:21

    you could also use
    if message.content.lower().startswith('command'): doesnt necessarily have to be startswith

提交回复
热议问题