Я пытаюсь добавить команду marry для моего бота discord.py, который я недавно начал программировать. Я хочу, чтобы указанный пользователь мог ответить боту.
Что касается кода прямо сейчас, он отвечает только мне.
@client.command()
async def marry(ctx, member: discord.Member):
await ctx.send(f"{ctx.author.mention} **proposes to** {member.mention} **Do you accept??** "
f"\nRespond with [y(es)/n(o)]")
def check(m):
return m.author == ctx.author
try:
msg = await client.wait_for('message', check=check, timeout=10)
if msg.content.lower() in ['y', 'yes']:
await ctx.send(f"Congratulations! {ctx.author.mention} and {member.mention} are now married to each other!")
elif msg.content.lower() in ['n', 'no']:
await ctx.send(f"Unlucky, maybe another time! {ctx.author.mention}")
else:
await ctx.send("I did not understand that, aborting!")
except asyncio.TimeoutError as e:
print(e)
await ctx.send("Looks like you waited too long.")
Кто-нибудь знает, как сделать так, чтобы бот мог распознать следующий ответ от указанного пользователя ( member: discord.Member) вместо меня?