coulld someone pls help me with my problem because when i use message it says invalid syntax
**Current behavior: if used message = invalid syntax
**Desired behavior it shoulld run and not give an error
**Repl link: python
import discord
import os
client = discord.Client()
@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
async message.startswith('&Hello'):
await ctx.send('Hello, How are you doing?')
async message.startswith('&Good and you?'):
await ctx.send('Good, Thank you for asking.')
client.run(os.environ('Token code'))
import discord
import os
client = discord.Client()
@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
if message.startswith('&Hello'):
await ctx.send('Hello, How are you doing?')
if message.startswith('&Good and you?'):
await ctx.send('Good, Thank you for asking.')
client.run(os.environ('Token code'))
Hello there, @BerkMustafov. I noticed you “solved” your problem, but the code above is the corrected code.