【发布时间】:2021-08-07 18:07:18
【问题描述】:
我正在制作一个不和谐的机器人,我想要一个自定义帮助消息。我试过了:
from discord.ext import commands
bot = commands.Bot(command_prefix="!")
@bot.command()
async def help(ctx):
member = ctx.author
await ctx.send(member, "test successful")
bot.run('TOKEN')
它应该向用户发送私人消息并发送任何内容。但是当我输入!help 时,机器人甚至不会对消息做出反应。
【问题讨论】:
-
你通过
member了吗?您是说运行!help后没有任何反应,这是因为您没有通过member,我猜。 -
@Dominik 这实际上是我在写问题时犯的一个错误,现在修复它。
标签: python python-3.x discord discord.py