【发布时间】:2020-11-13 21:44:51
【问题描述】:
代码:
import discord
from discord.ext.commands import Bot
from discord.ext import commands
bot = Bot(command_prefix = ".")
@bot.event
async def on_message(message):
print(message.content)
if message.author == bot.user:
return
if message.content.startswith("hello"):
await message.channel.send('hello!')
@bot.command(name="lol")
async def _lol(ctx):
print("lelele")
print(ctx.author)
await ctx.send("lelele")
- 当我输入 .lol 时,Bot 没有响应
- 如果我输入“你好”,机器人会回答
- 问题出在哪里?
【问题讨论】:
标签: python python-3.x discord.py