question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to make case insensitive commands

See original GitHub issue

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:

from discord.ext import commands

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

Any help would be appreciated.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

19reactions
JennyDiscordcommented, Apr 6, 2018

import discord from discord.ext import commands from discord.ext.commands import Bot

9reactions
johann-laucommented, Aug 13, 2021
@bot.event
async def on_message(message):
  partitioned = message.partition(" ")
  await bot.process_commands(partitioned[0].lower()+" "+partitioned[2])
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make a command case insensitive in discord.py
On the rewrite branch, commands.Bot accepts a case_insensitive parameter bot = commands.Bot(command_prefix='!', case_insensitive=True).
Read more >
Is there a way to make a command "case insensitive"? - Reddit
There is a bool class in discord.py called "case_insensitive" and it is default to false, but you can set it to true with:...
Read more >
How to make Bot Prefix Case Insensitive in discord py
How to make Bot Prefix Case Insensitive in discord py. Watch later. Share. Copy link. Info. Shopping. Tap to unmute.
Read more >
How to run ls command case insensitive mode on Linux/Unix
Open the terminal application · Type the shopt command to enable nocaseglob : $ shopt -s nocaseglob · Now use the ls command....
Read more >
How do you make the command mode case insensitive?
You can dynamically toggle smartcase using autocmds, so when in a : command line, it is off and when in a / command...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found