@client.event async def on_message(message): "" "Recruiting members (.rect @ numbers)" "" if message.content.startswith(".rect"): mcount = int(message.content[6:len(message.content)]) text = "More {} people are being recruited \ n" revmsg = text.format(mcount) frelist = [] msg = await message.channel.send(revmsg)
await msg.add_reaction("✅")
await msg.add_reaction("⬅")
await msg.add_reaction('✖')
while len(frelist) < int(message.content[6:len(message.content)]):
target_reaction = await client.wait_for(message=msg)
if target_reaction.user != msg.author:
if target_reaction.reaction.emoji == "✅":
if target_reaction.user.name in frelist:
frelist.remove(target_reaction.user.name)
mcount += 1
await client.edit_message(msg, text.format(mcount) +
'\n'.join(frelist))
Recommended Posts