How to make below command to work if members use below command in lower or upper or mixing.
If members use ping
it works.
but if members use Ping
it not works.
@bot.event
async def on_message(message):
message.content = message.content.lower()
await bot.process_commands(message)
@bot.command(pass_context=True)
async def ping(ctx):
msg = 'Pong {0.author.mention}'.format(ctx.message)
await bot.say(msg)
Update:
above on_message
is working correctly in single file but i splitted main file to multiple files. now how to make it work for cog in all files.
You can pass a
case_insensitive
option to yourBot
when you create it.