if (message.value[0] == "/" or message.value[0] == "\"):
do stuff.
I'm sure it's a simple syntax error, but something is wrong with this if statement.
if (message.value[0] == "/" or message.value[0] == "\"):
do stuff.
I'm sure it's a simple syntax error, but something is wrong with this if statement.
When you only need to check for equality, you can also simply use the in operator to do a membership test in a sequence of accepted elements:
if message.value[0] in ('/', '\\'):
do_stuff()
Escape the backslash:
if message.value[0] == "/" or message.value[0] == "\\":
From the documentation:
The backslash (\) character is used to escape characters that otherwise have a special meaning, such as newline, backslash itself, or the quote character.