This is my code
import os
import discord
import requests
import json
import random
client = discord.Client()
sad_words = ["sad", "depressed", "unhappy"]
starter_encouragements = [
"Cheer up",
"hang in there",
"You are a great person / bot!"
]
def get_quote():
response = requests.get("https://zenquotes.io/api/random")
json_data = json.loads(response.text)
quote = json_data[0]['q'] + " -" + json_data[0]['a']
return(quote)
@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
@client.event
async def on_message(message):
if message.author == client.user:
return
msg = message.content
if message.content.startswith('$inspire'):
quote = get_quote()
await message.channel.send(quote)
if any(word in msg for word in sad_words):
await message.channel.send(random.choice(starter_encouragements))
my_secret = os.environ['Token']
client.run(my_secret)
And this is the error message
File “main.py”, line 39
await message.channel.send(random.choice(starter_encouragements))
^
IndentationError: expected an indented block
I got into coding 2 days ago so i dont really understand coding so, please be as simple as you can
