my discord bot code from this vid says this error

my discord bot from this vid Code a Discord Bot with Python - Host for Free in the Cloud - YouTube says this error

Ignoring exception in on_ready
Traceback (most recent call last):
File “/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/”, line 343, in _run_event
await coro(*args, **kwargs)
File “”, line 15, in on_ready
if message.content.startswith(’$hello’):
NameError: name ‘message’ is not defined

it logs in but wont work with commands as well this is my code

import discord
import os

client = discord.Client()

async def on_ready():
print(‘We have logged in as {0.user}’.format(client))

async def on_message(message):
if == client.user:

if message.content.startswith(’$hello’):

1 Like