modules/image.py
async def duck(self, ctx):
        """Sends a pic of a duck."""
        async with aiohttp.ClientSession() as cs:
            async with cs.get("https://random-d.uk/api/v1/random") as r:
                res = await r.json()

        embed = discord.Embed(colour=3553599)
        embed.set_image(url=res["url"])
        await ctx.send(embed=embed)
Sends a pic of a duck.
Sends a pic of a duck.
Sends a pic of a duck .
async def duck(self, ctx):
        async with aiohttp.ClientSession() as cs:
            async with cs.get("https://random-d.uk/api/v1/random") as r:
                res = await r.json()
        embed = discord.Embed(colour=3553599)
        embed.set_image(url=res["url"])
        await ctx.send(embed=embed)
async def duck ( self , ctx ) : async with aiohttp . ClientSession ( ) as cs : async with cs . get ( "https://random-d.uk/api/v1/random" ) as r : res = await r . json ( ) embed = discord . Embed ( colour = 3553599 ) embed . set_image ( url = res [ "url" ] ) await ctx . send ( embed = embed )
Sends a pic of a duck.
Sends a pic of a duck .
"""Sends a pic of a duck."""
self
ctx