Is it possible to send an image using `plugin-api`

I have a leveling bot and a dashboard for it, i was wondering if there was a way to get the users rank card from the api instead of generating the image on the dashboard.
Solution:
response.setContentType(MediaTypes.ImagePng).status(200).end(bufferOfTheImage) if i remember correctly. Let me know if it works. We could add utility methods for this.
Jump to solution
7 Replies
Solution
Favna
Favna11mo ago
response.setContentType(MediaTypes.ImagePng).status(200).end(bufferOfTheImage) if i remember correctly. Let me know if it works. We could add utility methods for this.
Oreo ™
Oreo ™OP11mo ago
this worked after i changed MediaTypes to MimeTypes but i just assumed that was a typo
Favna
Favna11mo ago
it was @Oreo ™ I was writing Java backend all day and with Spring Framework it is MediaTypes so that's why I made the mistake.
Oreo ™
Oreo ™OP11mo ago
yeah its cool would be nice if there was an easier way to do this
Favna
Favna11mo ago
there it's released in 6.1.0 @Oreo ™
Oreo ™
Oreo ™OP11mo ago
nice
Want results from more Discord servers?
Add your server