So theres no errors in my code, and it works find, but when I type the command !hello it supposed to say hi back, but it does nothing
import discord
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.content.startswith('!hello'):
await message.channel.send('hi im darkbot');
client.run(i put the token here but i dont want to send it here');
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
you put the second statement inside the first, and as it is after a return it will never be executed
I recommend looking up basic Python syntax as it’s pretty essential here