Users who are viewing this thread


Hello Everyone!

For the past week I've been working on my first Javascript project; A Discord bot that fetches the current/max player count and displays them on a Discord server, updating regularly. I feel that it is now in a state that I can share it with you all. I will update it over time, but you can change it however you want. It is very primitive and only has one feature at the moment that sets the bots presence status as shown here:
iWRarVS.png


Eventually, you can also expect it to edit a channel with the current player stats, and display the stats in an embed (without uptime, as is Oasis Hosting specific). I just need to rewrite these parts as they work but aren't production grade just yet.
nnMkmak.png

DHNuoyH.png


If you're new to Discord bots please follow this tutorial from steps 2 to 4 and set the token in the bot files. You then need to look into Node.js to understand the basics and how and where to host the bot, i.e. a Linux server. Will work fine on either though, as long as you have the dependencies for Node.js installed. Be sure to read the setup.md file as it has important instructions to get the bot working such as setting up environment variables (env).

Any questions or suggestions please do let me know! My Discord details are on the GitHub repo so you can contact me on there if you need anything, or just reply to this thread.

Thanks,
Jordan.
 
  • Version 1.0.1
    • Added missing modules because of repl.it commit not including them.

  • If the gameserver goes offline the bot 'playing status' will cease to update. I'm working on adding an error handler that can deal with bad requests that will assume the server is offline. About 70% done. Quick fix is to adjust the refresh timer to 60 seconds so that when a gameserver is restarted it has more time to get up and running. If this doesn't fix it, restart the bot and it will.
 
Last edited:

Thanks! I'm not looking for this to compete with the Bladecast bot but more give something to the community that they can change to their needs. Over time, I intend to add more features, but Bladecast bot is definitely the most refined from what I can see. This is my first node.js/js project so it will probably change significantly.
 
Back
Top Bottom