Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. @commands.command(aliases="giveaway")
  2. @commands.has_permissions(manage_guild=True)
  3. async def sorteio(self, ctx, *, desc: str=None, duracao: int=None):
  4. if desc is None:
  5. await ctx.send(f"``{ctx.author.name}`` você deve informar uma descrição para o sorteio.")
  6. elif duracao is None:
  7. await ctx.send(f"> ``{ctx.author.name}`` você deve informar a duração deste sorteio(em segundos).")
  8. else:
  9. canal = self.client.get_channel(675861076360953906)
  10. embed = discord.Embed(color=0x00CED1, title="🎁 Sorteio", description=f"{desc}\n\nDuração: {duracao}")
  11. embed.set_footer(text="Reaja com 🎉 para participar.", icon_url=self.client.user.avatar_url)
  12. await canal.send(embed=embed)
  13. await embed.add_reaction("🎉")
  14.  
  15. @commands.Cog.listener()
  16. on_reaction_add(reaction, user):
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement