Open cattoman1 opened 2 years ago
Won't be able to test until later this evening, but looks like I may have missed updating a line of code when I was working on the server icon code.
Try replacing line 190:
const attachment = new Discord.MessageAttachment(Buffer.from(body.favicon.substr('data:image/png;base64,'.length), 'base64'), "icon.png")
with this:
var imageStream = Buffer.from(defaultFavicon, 'base64');
if(body.favicon != null){
imageStream = Buffer.from(body.favicon.substr('data:image/png;base64,'.length), 'base64');
}
const attachment = new Discord.MessageAttachment(imageStream, "icon.png");
i think i did it right but it wont work
Should look like this when done
I've made a temp update to the code here: https://github.com/emerysteele/minecraft-server-status-bot/blob/emerysteele-patch-1/app.js
If you wanna just copy/paste the whole thing.
The token error might be separate tho, maybe double check your config.json file if you still get that message after updating the code? Your token should come from the discord developer portal.
help