I'm not sure what is wrong with my python code, but I've been trying to get this to work wit ha bunch of different variations for a couple days now. The bot launches and goes online, but whenever I try to input a command into discord, the bot never responds. I've tried in multiple servers as well as my own. Here is my code:
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("Hello!")
client.run("original token would be here")