Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mir2 Discord Status Bot

Triggering fresh deployment...

This is a serverless Discord status bot for your Legend of Mir 2 server, designed to run on Vercel.

Features

  • TCP Check: Pings the configured IP and Port (LoginServer/GameGate) to verify connectivity.
  • Discord Notification: Sends status updates (ONLINE/OFFLINE) via Discord Webhooks.
  • Automated Cron Job: Configured to run every 15 minutes automatically via Vercel.

Setup Instructions

  1. Deploy to GitHub:

    • Create a new repository on GitHub.
    • Push these files to your repository.
  2. Connect to Vercel:

    • Go to Vercel and import your repository.
    • During the import, add the following Environment Variables:
      • DISCORD_WEBHOOK_URL: Your Discord Webhook URL.
      • MIR2_SERVER_IP: Your Mir2 server's IP address.
      • MIR2_SERVER_PORT: Your Mir2 server's port (default is 7000).
  3. Enjoy Automatic Updates:

    • The cron job defined in vercel.json will trigger the /api/status endpoint every 15 minutes.
    • You can also manually trigger it by visiting https://your-vercel-domain.vercel.app/api/status.

Player Count (Optional)

If your server exposes the player count via a web link or JSON, you can modify api/status.js to fetch and include that information in the Discord message.


Important

Ensure your Server Firewall allows TCP connections on the specified port from Vercel's IP ranges (or just keep it open for monitoring).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages