Ask coding questions

← Back to all posts
How do i disable the case sensitivity?
RainbowGuy (0)

so,im making a discord bot and i want to remove the case sensivity in commands so,if a command is $Help and i type $help to be taken as command

Comments
hotnewtop
SixBeeps (5056)

The lower() function deals with case sensitivity. You can call it on any string.

if message.content.lower() == "$help":
  print("Cool list of commands or something")
NehalRam (4)

you can do it like
input = input()
if input == $Help:
do something
else:
input.lower()
if input.lower == $help
do something

NehalRam (4)

might be the easy solution