Hi, so I have tried using the python discord bot tutorial and I am having some issues. I am able to log into the bot but my message back doesn’t seem to work. I have it set up so that if you say “!hi” then the bot will reply with “Hello!” but it doesn’t reply.
Below is my code. Thanks for the help!
import discord
client = discord.Client(intents=discord.Intents.default())
@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("!hi"):
await message.channel.send("Hello!")
client.run("MY TOKEN")