minecraft-server-status-bot icon indicating copy to clipboard operation
minecraft-server-status-bot copied to clipboard

I cant use mc!status or the bot crashes

Open cattoman1 opened this issue 3 years ago • 3 comments

image help

cattoman1 avatar Apr 21 '22 15:04 cattoman1

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");

emerysteele avatar Apr 21 '22 15:04 emerysteele

image i think i did it right but it wont work image

cattoman1 avatar Apr 21 '22 15:04 cattoman1

Should look like this when done chrome_183J0vcs30

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. notepad++_UUYCRpoW1o

emerysteele avatar Apr 21 '22 16:04 emerysteele