Closed bencerwn closed 6 years ago
Either you're using the async branch, which does not support case insensitive commands (although a number of hacks exist to get it to work), or you're using the rewrite branch and haven't updated it- case_insensitive was added rather recently.
Also possible is you're making some other error that can't be seen here; but that would be an issue with your code and not what you've presented.
How do I use the rewrite branch?
@SlenderDoge RTFM: https://discordpy.readthedocs.io/en/rewrite/
.....actually no. The docs for rewrite don't tell you how to install it because they're assuming it's already been released to pip. If you want to use the rewrite branch, it's mandatory that you be on the discord.py server (invite), as breaking changes are announced there and you're expected to keep up. It's also a massive breaking change so all d.py-related code will break, and need porting.
import discord from discord.ext import commands from discord.ext.commands import Bot
@bot.event
async def on_message(message):
partitioned = message.partition(" ")
await bot.process_commands(partitioned[0].lower()+" "+partitioned[2])
I'm new to discord.py and have looked through the documentation, but I can't seem to figure out how to use the case_insensitive option. I know that there has already been a post on this, about a year ago, but as I've said, I found a "case_insensitive option" for commands in the API Reference -> Bot section and just can't get it to work. So far I've tried this:
Any help would be appreciated.