예제 #1
0
 async def blur(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.blur(), url)
     await ctx.send(
         file=discord.File(fp=img.image, filename=f"pixel.{img.format}"))
예제 #2
0
 async def blur(
     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.blur(), url)
     file = discord.File(fp=img.image, filename=f"pixel.{img.format}")
     await ctx.send(file=file)
예제 #3
0
파일: Images.py 프로젝트: Daggy1234/Elli0t
 async def _blur(self, ctx, *, member: discord.Member):
     '''
     Forgotten your glasses?
     '''
     with ctx.channel.typing():
         url = str(
             member.avatar_url_as(format="png",
                                  static_format="png",
                                  size=1024))
         img = await self.dagpiclient.image_process(ImageFeatures.blur(),
                                                    url)
         file = discord.File(fp=img.image, filename=f"blur.{img.format}")
         await ctx.send(file=file)
예제 #4
0
파일: cog.py 프로젝트: avimetry/avimetry
 async def dag_blur(self, ctx: Context, *, item=None):
     """
     Adds a blury effect to your image.
     """
     meth = await self.do_dagpi(ctx, ImageFeatures.blur(), item)
     await self.dag_embed(ctx, meth, ctx.command.name)