@client.command()
async def gcreate(ctx, mins: int, *, prize):
await ctx.send("Giveaway!")
embed = discord.Embed(title="New Giveaway")
embed.add_field(name = "Prize:", value = f"{prize}")
end = datetime.utcnow() + datetime.timedelta(seconds=mins*60)
embed.add_field(name = "Ends At", value = f"{end}UTC")
embed.set_footer(text=f"1 Winner | Ends {mins} min(s) from now!")
my_msg = await ctx.send(embed=embed)
await my_msg.add_reaction(":tada_cyan:")
await asyncio.sleep(mins*60)
new_msg = await ctx.channel.fetch_message(my_msg.id)
users = await new_msg.reactions[0].users().flatten()
users.pop(users.index(client.user))
winner = random.choice(users)
await ctx.send(f"{winner.mention}")
embed2 = discord.Embed(title="Winner!", description=f"{winner.mention}")
embed2.set_thumbnail(url=winner.avatar_url)
embed2.add_field(name = "Prize", value=f"{prize}")
embed2.set_footer(text="Giveaway Ended!")
server = ctx.guild.name
await ctx.send(embed = embed2)
await winner.send(f"You Won a giveaway in {server} \n Prize: {prize}")
8th line






