Why does my if statement doesn't work on my if block python discord bot development [closed]
Your indentation is incorrect it should be written like so:
if message.content.startswith("$Give me a q"):
await message.channel.send("Ok.")
await message.channel.send("In which topic would you like to get a q for?")
await message.channel.send("as for now we have q from wars of Israel, The
founders of Israel and overall and the holocost (please choose by typing a
number like 1,2,3 etc...)")
if message.content.startswith('$1'):
await message.channel.send("Great here is your q:")
await message.channe.send(q_random('wars_of_Israel.txt'))
elif message.content.startswith('$2'):
await message.channel.send("still in construction...")
elif message.content.startswith('$3'):
await message.channel.send("still in construction...")
This will force the code to evaluate all of the if statements.