Reputation: 73
I saw a previous answer, sadly it was not in Discord's rewrite. I've tried doing many different things, nothing has worked so far.
@bot.command()
async def kickroulette(ctx):
message = await ctx.send("React here!")
await asyncio.sleep(10)
user = random.choice(users who have reacted)
await ctx.guild.kick(user)
Upvotes: 1
Views: 389
Reputation: 4225
You need to fetch the message again with it's ID to get new reactions.
@bot.command()
async def kickroulette(ctx):
message = await ctx.send("React here!")
await asyncio.sleep(10)
msg = await ctx.channel.fetch_message(message.id)
reactors = await msg.reactions[0].users().flatten()
user = random.choice(reactors)
await ctx.guild.kick(user)
Upvotes: 1