It only displays one of the commands at one given time.
If I write !hi or !bye it won't work, but if I write !sing it would output la la la.
If I switch the character before it, it would change to
!hi or !sing not working
but !bye working and saying Goodbye!
import os
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('!hi'):
await message.channel.send('Hello!')
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('!bye'):
await message.channel.send('Goodbye Friend!')
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('!sing'):
await message.channel.send('la la la')
client.run(os.getenv('TOKEN'))```