“Perintah meme discord.py” Kode Jawaban

Perintah meme discord.py

@client.command(pass_context=True)
async def meme(ctx):
    embed = discord.Embed(title="", description="")

    async with aiohttp.ClientSession() as cs:
        async with cs.get('https://www.reddit.com/r/dankmemes/new.json?sort=hot') as r:
            res = await r.json()
            embed.set_image(url=res['data']['children'] [random.randint(0, 25)]['data']['url'])
            await ctx.send(embed=embed)
Long Lark

Perselisihan Bot Python Meme Command

@client.command(pass_context=True)
async def meme(ctx):
    embed = discord.Embed(title="", description="")

    async with aiohttp.ClientSession() as cs:
        async with cs.get('https://www.reddit.com/r/dankmemes/new.json?sort=hot') as r:
            res = await r.json()
            embed.set_image(url=res['data']['children'] [random.randint(0, 25)]['data']['url'])
            await ctx.send(embed=embed)
Thecodecopyer

Jawaban yang mirip dengan “Perintah meme discord.py”

Pertanyaan yang mirip dengan “Perintah meme discord.py”

Lebih banyak jawaban terkait untuk “Perintah meme discord.py” di Python

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya