async def obama(self, ctx, member: discord.Member = None):
     await ctx.trigger_typing()
     if member is None:
         member = ctx.author
     url = str(
         member.avatar_url_as(format="png", static_format="png", size=1024))
     img = await self.bot.dagp.image_process(ImageFeatures.obama(), url)
     await ctx.send(
         file=discord.File(fp=img.image, filename=f"pixel.{img.format}"))
Example #2
0
 async def obama(
     self,
     ctx,
     thing: typing.Union[discord.Member, discord.PartialEmoji,
                         discord.Emoji, str] = None,
 ):
     async with ctx.channel.typing():
         url = await self.get_url(ctx, thing)
     img = await dagpi.image_process(ImageFeatures.obama(), url)
     file = discord.File(fp=img.image, filename=f"pixel.{img.format}")
     await ctx.send(file=file)
Example #3
0
 async def obama(self, ctx, member: discord.Member = None):
     """Makes the obama self award meme, but with author or given users profile picture"""
     if member is None: member = ctx.author
     url = str(
         member.avatar_url_as(format="png", static_format="png", size=1024))
     try:
         img = await self.bot.dagpi_client.image_process(
             ImageFeatures.obama(), url)
     except Exception as e:
         return await ctx.send(f"``` \n {e} ```")
     file = discord.File(fp=img.image, filename=f"colors.{img.format}")
     await ctx.send(embed=discord.Embed(color=0x31A1F1).set_image(
         url=f"attachment://colors.{img.format}"),
                    file=file)
Example #4
0
 async def _obama(self, ctx, *, member: discord.Member):
     '''
     The man the myth the legend
     '''
     await ctx.send("Please wait, this may take some time")
     with ctx.channel.typing():
         url = str(
             member.avatar_url_as(format="png",
                                  static_format="png",
                                  size=1024))
         img = await self.dagpiclient.image_process(ImageFeatures.obama(),
                                                    url)
         file = discord.File(fp=img.image, filename=f"obama.{img.format}")
         await ctx.send(file=file)
Example #5
0
 async def dag_obama(self, ctx: Context, *, item=None):
     """
     You deseve an award. Here award yourself.
     """
     meth = await self.do_dagpi(ctx, ImageFeatures.obama(), item, True)
     await self.dag_embed(ctx, meth, ctx.command.name)