【发布时间】:2021-07-27 03:57:38
【问题描述】:
它考虑到用户输入,所以就像我被委托做一个提示但我从来没有这样做过,所以这是我在网上找到的
playerChoice = await bot.wait_for('message', check=check(ctx.author), timeout=30)
我得到了一些,但我没有得到“消息”部分和“检查 = 检查”。
这是我的完整代码
@client.command()
async def event(ctx):
await ctx.send("Prompt will continue in DMs.")
embed = discord.Embed(title="Event Prompt", description="Please specify the type of event.")
embed.set_footer("Prompt will expire in ## seconds")
await ctx.author.send(embed=embed)
eventType = await bot.wait_for('message', check=check(ctx.author), timeout=30) # I want it to send the event type.
await ctx.send(eventType)
我想要一个解释和一种可能的方法来改进它并使其发挥作用。提前致谢
【问题讨论】:
标签: discord discord.py