hii, my replit is gimme an error
File “main.py”, line 16
await message.channel.send(‘hello!’)
^
SyntaxError: ‘await’ outside function
in python help me guys. the code is down.|
import discord
import os
client = discord.Client()
@client.event
async def on_ready():
print(‘Logged is as {0.user}’.format(client))
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith(‘$hello’):
await message.channel.send(‘hello!’)
client.run(os.environ(‘TOKEN’))