Discord currency bot SyntaxError

Viewed 63

I was programming a discord currency bot in python when I got a SyntaxError from this line:

client = commands.Bot(command_prefix = c!)

Any ideas on what it could be?

2 Answers

You'll need to store the command_prefix argument in a string using quotes:

client = commands.Bot(command_prefix='c!')

The syntax c! is invalid because ! is only used in Python as part of a not equals operator, != (see operators).

Related