擅长:python、mysql、java
<p>我真的更喜欢https://meme-api.herokuapp.com/gimme/(你的subreddit)这将从你提供的subreddit中随机返回一篇文章,但subreddit必须有照片(它将以JSON的形式返回)
这是我目前的meme代码</p>
<pre><code>@client.command(pass_context=True, description='Usage: e!meme')
async def meme(ctx):
content = get("https://meme-api.herokuapp.com/gimme/dankmemes").text
data = json.loads(content,)
meme = discord.Embed(title=data['title'], url=data['postLink'], color = colors.purple, timestamp=ctx.message.created_at)
meme.set_image(url=f"{data['url']}")
meme.set_footer(text=f'Used by {ctx.author.name}', icon_url=ctx.author.avatar_url)
await ctx.reply(embed=meme)
</code></pre>
<p><a href="https://github.com/D3vd/Meme_Api" rel="nofollow noreferrer">https://github.com/D3vd/Meme_Api</a>这是文件</p>