Exemple #1
0
 async def dag_wayg(self, ctx, item1: GetAvatar, item2: GetAvatar):
     """
     Well why are you??
     """
     async with ctx.channel.typing():
         image = await self.bot.dagpi.image_process(
             ImageFeatures.why_are_you_gay(), url=item1, url2=item2)
     await self.dag_embed(ctx, image, ctx.command.name)
 async def whyrugay(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.why_are_you_gay(),
         str(ctx.message.author.avatar_url),
         url2=url)
     await ctx.send(
         file=discord.File(fp=img.image, filename=f"pixel.{img.format}"))
 async def why_are_u_gay(
     self,
     ctx,
     thing: typing.Union[discord.Member, discord.PartialEmoji,
                         discord.Emoji, str],
     thing2: typing.Union[discord.Member, discord.PartialEmoji,
                          discord.Emoji, str] = None,
 ):
     async with ctx.channel.typing():
         url = await self.get_url(ctx, thing)
         url2 = await self.get_url(ctx, thing2)
     img = await dagpi.image_process(ImageFeatures.why_are_you_gay(),
                                     url=url,
                                     url2=url2)
     file = discord.File(fp=img.image, filename=f"pixel.{img.format}")
     await ctx.send(file=file)
Exemple #4
0
    async def whyareyougay(self,
                           ctx: commands.Context,
                           member: discord.Member,
                           author: discord.Member = None):
        author = author or ctx.author

        member_avatar = str(
            member.avatar_url_as(static_format='png', size=1024))
        author_avatar = str(
            author.avatar_url_as(static_format='png', size=1024))
        image = await ctx.dagpi.image_process(ImageFeatures.why_are_you_gay(),
                                              member_avatar,
                                              url2=author_avatar)

        filename = f'why_are_you_gay.{image.format}'
        file = discord.File(fp=image.image, filename=filename)

        await ctx.send(file=file, image=f'attachment://{filename}')