SirShadowShark
DIAdiscord.js - Imagine an app
•Created by SirShadowShark on 2/11/2024 in #djs-questions
403 Error due to new image expiration?
Hey all, I'm unfortunately having issues with a ticket transcript system that I created for my discord bot. I've done some researching and I've come to the conclusion that I may not have access to the content I'm trying to fetch, or I've been flagged and limited.
What boggles my mind is that I never had an issue in the past 3-4 months with this approach, but I am now, so I'm more so leaning towards I'm being limited, or not requesting an image correctly for discord. I will admit it is rather primitive on how I made this function, so, apologies. Here is my code that seems to be causing my issue, as well as an abbreviated error code that I receive when calling it.
I did do some more digging and found that there was a new discord image expiration, or link / attachment expiration due to not wanting malware to be spread. Currently I am unsure how to request this new type of format with a bot.
fetchImage:
little annoying error:
Error fetching image from URL: (dicsord image url) AxiosError: Request failed with status code 403
code: 'ERR_BAD_REQUEST',
I'm fairly certain I've overlooked something rather simple, so apologies in advance, but any and all help is greatly appreciated! 😄
16 replies