【发布时间】:2020-11-24 00:33:29
【问题描述】:
vote_msg = await ctx.send(embed=embed)
await vote_msg.add_reaction('✅')
await vote_msg.add_reaction('❎')
reaction, member = await ctx.bot.wait_for('reaction_add')
vote_msg = await vote_msg.channel.fetch_message(vote_msg.id) # refetch message
# default values
positive = 0
negative = 0
for reaction in vote_msg.reactions:
if reaction.emoji == '✅':
positive = reaction.count - 1
elif reaction.emoji == '❎':
negative = reaction.count - 1
print(positive)
print(negative)
目前我有这个来重新获取消息的反应,我怎样才能让它在有人第一次反应后重新获取它,而不是让它等待 5 秒并检查?
【问题讨论】:
标签: python python-3.x discord discord.py discord.py-rewrite