-1

How can i make my python discord bot caps non sensitive.

if message.content.startswith('$doge'):
        price('dogecoin')

        await dembed('Dogecoin', 'https://www.shareicon.net/data/2015/09/14/101012_doge_512x512.png', message.id)

        print('Dogecoin:', rprice)

1 Answers1

0

Since message.content is a string, we can use the lower method to get the lowercase string.

if message.content.lower().startswith('$doge'):
   # do stuff

References and further reading:

Ceres
  • 2,498
  • 1
  • 10
  • 28