“MEME Commande Discord.py” Réponses codées

MEME Commande 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

Commande de mème Discord Bot Python

@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

Réponses similaires à “MEME Commande Discord.py”

Questions similaires à “MEME Commande Discord.py”

Plus de réponses similaires à “MEME Commande Discord.py” dans Python

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code