squishy
squishy

Reputation: 53

Discord currency bot SyntaxError

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?

Upvotes: 2

Views: 69

Answers (2)

ogdenkev
ogdenkev

Reputation: 2374

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

Upvotes: 0

Red
Red

Reputation: 27577

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

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

Upvotes: 3

Related Questions