Giter Site home page Giter Site logo

notyouraveragegamer / mcstatus-bot-for-discord Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.94 MB

A bot that will ping the mcstatus.io API to retrieve Status, Version and Player Count. It then takes that information and uses it to create an Embed/Webhook that will be posted to a Discord Channel of your choice.

Home Page: https://mcstatus.io

License: GNU General Public License v3.0

JavaScript 100.00%

mcstatus-bot-for-discord's Introduction

MCStatus Bot for Discord

MCStatus Bot for Discord is a bot designed to fetch the status of Minecraft servers and display that information in a Discord server. It periodically checks the status of Minecraft servers (Java Edition and Bedrock Edition) using user-provided API URLs from mcstatus.io and updates the server status on Discord using webhooks and embeds.

โœจ Features

  • Compatible with all versions of Minecraft (Bedrock, Java, Paper, etc.)
  • Fetches and displays the status of Minecraft servers on Discord
  • Updates server status periodically using webhooks and embeds.
  • Supports displaying Server Status, Player Count, Server Version, and Restart Schedule.

๐Ÿ’ก Prerequisites

Before using the MCStatus Bot for Discord, make sure you have the following:

  • Node.js installed. (Installing Node.js)
  • A Discord server where you have permissions to add bots and manage webhooks.
  • API URLs for the Minecraft servers you want to monitor. (I use mcstatus.io)
    • Java URL example: https://api.mcstatus.io/v2/status/java/YOUR.SERVER.IP
    • Bedrock URL example: https://api.mcstatus.io/v2/status/bedrock/YOUR.SERVER.IP
  • A Discord webhook URL to send updates to your Discord server. (You can obtain one from Discohook. Formatting is handled in main.js)
  • A .env file with necessary environment variables set (copy/rename example.env for quick-setup).

โšก๏ธ Installation

  1. Download and unzip this repo

    OR clone (click)
    git clone https://github.com/NotYourAverageGamer/MCStatus-Bot-for-Discord.git
  2. Navigate to the directory:

    cd YOUR_PATH_TO/MCStatus-Bot-for-Discord
  3. Install dependencies:

    npm install

๐Ÿ› ๏ธ Config

  • Copy/Rename example.env to .env and fill in the following environment variables:
    • SERVER_NAME: Your server name, to be displayed as the title in the webhook.
    • JAVA_API_URL: API URL for the Java Edition Minecraft server.
    • BEDROCK_API_URL: API URL for the Bedrock Edition Minecraft server.
    • WEBHOOK_URL: Discord webhook URL for posting updates.
    • MESSAGE_ID: ID of the message to edit with new embeds.
    • DYNMAP_URL: Enter Dynmap URL (if applicable).
    • THUMBNAIL_URL: Enter URL to server thumbnail.

๐Ÿง‘โ€๐Ÿ’ป Usage

To start the bot, run the following command from inside the MCStatus-Bot-for-Discord directory:

npm start

This will initiate the bot, and it will periodically fetch and update the status of the Minecraft servers on your Discord server. (Default is 15 minutes)

๐Ÿ“ธ Example Images (Icon not included)

๐Ÿ–ฅ๏ธ Desktop (click)
๐ŸŽ iOS (click)
๐Ÿค– Android (click)

mcstatus-bot-for-discord's People

Contributors

notyouraveragegamer avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.