import discord
from discord.ext import commands
client = discord.Client()
@client.event
async def on_ready():
print("The bot is Online!")
await client.change_presence(game=discord.Game(name="Botting Around"))
@client.event
async def on_message(message):
if message.content.startswith('hey'):
await client.send_message(message.channel, 'Heya')
@client.event
async def on_message(message):
if message.content.startswith('bye'):
await client.send_message(message.channel, 'Cya')
@client.event
async def on_message(message):
if message.content.startswith('ping'):
await client.send_message(message.channel, 'pong')
@client.event
async def on_message(message):
if message.content.startswith('popdaisy2'):
await client.send_message(message.channel, 'ew')
@client.event
async def on_message(message):
if message.content.startswith('haha'):
await client.send_message(message.channel, 'Ahahaha!')
client.run(filler)
请为该代码请求替代方法!就像拥有输入字词并提供一定输出的方法一样。现在,我知道您只能使用一个on_message。