I have now completed adding discord support to the bot. After some shuffling around I got the last commands working, and now the bot is fully configurable as well!
By editing config.js you can change all kinds of parameters, for example all api urls can be changed (although they should reply in a similar way to work), and you can change default values such as the default icon used, the default port per server type, and the timeout used for requests. You can also configure the width, height and font used for player images. I also
There is also a messages.js file now, where you can configure the messages the bot replies with, for example on a certain error and the footer used for discord component v2 embeds.
I started working on this project again after a while and now I already have almost 8 hours to be logged.
I have since started working on making this bot also be supported on discord, by first refactoring all my slack commands to be modular so I can easily request server status information 
I also made the first two slack commands to be on
discord: those are the /ping and /status commands. the /ping command just simply replies with a message “pong!”, and the /status command uses discord’s components v2 via discord.js to make the output look as nice as possible. You can see it in the attached screenshot.
Some errors I still have though are the following:
I want to fix these errors and also add the other slack commands to discord, and then maybe even look into making the message of the day look better. (colors…??)
I was looking on egorro’s site blueprint that collects create addons and puts them nicely together, when I noticed that on my monitor (1440p) the text was overflowing in the info cards.
So as any normal person would do I tried to fix it.
I tried and I tried until I eventually fixed it by modifying the padding for large screens (2xl so 1536px wide and more) from 4 to 1. No idea how it took me TWO HOURS before I found that I tried so many different ways.
After having noticed a bug since the beginning of my vacation in France I’ve been eager to fix it which I’ve now finally been able to do.
The API I used for server icon fetching went down / discontinued so I made it use the same api as all others (idk why I used another one in the first place)
I’ve also made some other fixes since my last devlog, these are just like simple spelling errors but I also made all requests be fetched with retries, so there is less chance of things breaking. Also when a server is offline the max players is now reported as zero.
I fixed a lot of bugs with the
bot causing unnecessary errors and other unintended things. Some of these include:
sometimes my bot’s command, /craftie-player will just hang and only place the generating message and not anything else.
So now I added TONS of debug logging to (hopefully) finally find out
why this happen(s/ed).
I also changed the way it puts the image to use
axios with a timeout so it can still do something if it fails.
let’s hope this will work :)
Fixed a bug where the bot gives an error if you try to fetch a java server without an srv record. It now first checks if the srvrecord.port object is there in the api request and otherwise it sets the srvPort variable to a supplied port in the command (if given, although I don’t think doing that was even necessery whatsoever)
Fixed a bug where the bot gives an error if you try to fetch a java server without an srv record. It now first checks if the srvrecord.port object is there in the api request and otherwise it sets the srvPort variable to a supplied port in the command (if given, although I don’t think doing that was even necessery whatsoever)
I made a lot of QoL additions to the bot to make using it more pleasant. To start I added a pfp to the bot so it’s more recognizable, which as of right now is just a pixelated (minecraft) version of my pfp but I want to change it later if I got more time.
I also added the command /craftie-player <Name|UUID> where you can get information on players like their uuid and username (although you should already know one of them by using the command) with a nice profile-card like image generated with the canvas library.
It also shows the player head, and I want to later add buttons or something like that below to download the skins. I also want to add stuff like account creation name and maybe last three usernames to the image.
That’s it for this devlog and maybe I’ll see you in the next one :)
I changed a lot of the code now to use a java server’s SRV port if it’s defined, so now the server icon’s display right if you don’t define a port. I also made servers without an icon (due to an error or it being a bedrock server) display the default server icon (pack.png in BW).
I also started making a new command, /craftie-player which will look up player info like their UUID and skin.
I updated the status command to use a slack block kit instead of plain text so now it looks much cleaner. This also allows me to implement more features later like maybe a reload button.
I also fixed a bug causing the bot to freak out if the server being queried was offline because soms data wouldn’t be available then and I was requesting it at the wrong time. Now it just displays “Unavailable” for those stats.
I updated the bot to show many more statistics such as the mincraft version and MOTD. It also shows the amount of online players and the specific players that are online if the server announces it.
Two commands were from the tutorial (ping and help) and one “from scratch” (of course with help from the tutorial).
It is now just saying “Server Online” if the response.online == true and “Server Offline” if false. Next I want to implement custom parameters so you can select what server you want to check the status for. Then I also want to make the status message look nicer.