Could you please help this python beginner? The bot isn’t replying at all in the server even though the code says it’s ready.
My code:
import discord
import os
my_secret = os.environ['TOKEN']
client = discord.Client()
@client.event
async def on_ready():
print('{0.user} is ready.'.format(client))
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('>hello'):
await message.channel.send('no.')
client.run(my_secret)import discord
import os
my_secret = os.environ['TOKEN']
client = discord.Client()
@client.event
async def on_ready():
print('{0.user} is ready.'.format(client))
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('>hello'):
await message.channel.send('no.')
client.run(my_secret)
Error Message: