我刚开始学习python,并尝试创建一个discord机器人。以下是一段代码片段:
prefix = "https://render-tron.appspot.com/screenshot/https://brilliant.org/"
@bot.command(pass_context=True)
async def daily(ctx):
img_url = prefix + "daily-problems/"
embedVar = discord.Embed(Title = "Brilliant", url = "https://brilliant.org")
embedVar.set_image(url = img_url)
await ctx.send(embed = embedVar)
如何裁剪图像并将其嵌入?我尝试从url保存图像,然后使用PIL进行裁剪,但这是一个漫长的过程。还有别的办法吗
目前没有回答
相关问题 更多 >
编程相关推荐