This is a Discord bot that displays the status of a Minecraft server. It uses the discord.js
library to interact with the Discord API and the minecraft-server-util
library to retrieve information about the Minecraft server.
- Clone this repository:
git clone https://github.com/sniper19p/crewcraft.git
- Install the dependencies:
npm install
- Set up a new Discord bot and obtain its token. You can follow these instructions to create a new bot and these instructions to obtain its token.
- Set the bot token as an environment variable:
export DISCORD_TOKEN=your-bot-token
- Modify the
SERVER_IP
andUPDATE_INTERVAL
variables inindex.js
to suit your needs.
Run npm start
to start the bot. The bot will automatically update the status of the Minecraft server every UPDATE_INTERVAL
milliseconds and post the information in a Discord channel.
This project is licensed under the MIT License.