I just started learning python, and tried my hands on creating a discord bot. Here is a code snippet:
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)
Output: Image of the bot output
How can I crop the image and then embed it? I tried saving the image from url then crop it using PIL, but it was a lengthy process. Is there any other way to do it?