
Is there a way to do this? Or is there a better way to fetch a cdn.discordapp image (from the url) as bytes?Įdit: I've realised that you can also get the proxy URL by checking _url of a given message, but I get 403 forbidden when trying to download from there too.

discord.Asset seemed like the most sensible class to try and accomplish this with but I can't see how to instantiate an object of it starting with just a discord cdn url. So I'm looking for another way to retrieve an image from a discord cdn url. Which raises .CommandInvokeError: Command raised an exception: HTTPError: HTTP Error 403: Forbidden As part of that, I'd like to obtain the image as a bytes object - this is simple when working with attachments, and even with images on other URLs, but I get a HTTP 403 forbidden error whenever I use on a discord cdn URL. I have a further command which will manipulate the image in a referenced message. The content of that message is just the cdn URL, as above. I ask as I have built one command which will send a _url of a given member as a message in the channel it was called in.


They come in all shapes and sizes, from small hobby projects for your server with friends, to huge projects that live in hundreds of thousands of servers. ago In simple terms, it's where Discord hosts images and other files. Bots and apps are the lifeblood of the Discord development community. Tl dr Is there a way to fetch an Asset object from a cdn.discordapp URL, such as ''? It's basically where the attachements are stored (e.g.
