Skip to content

A Discord bot that monitors hll player counts for a game server using an CRCON API and displays them in a Discord channel.

License

Notifications You must be signed in to change notification settings

hackletloose/hall-crcon-player-count

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Server Monitor

A HLL CRCON Discord bot that monitors player counts for a game server using an CRCON API and displays them in a Discord channel.

Prerequisites

  • Node.js v18 or higher
  • A Discord bot token (create a bot at Discord Developer Portal)
  • Access to an RCON API for your game server
  • A Discord channel ID where the bot will post updates

Setup

  1. Clone the repository:

    git clone https://github.com/hackletloose/hall-crcon-player-count.git
    cd hall-crcon-player-count
  2. Install dependencies:

    npm install
  3. Create a .env file in the root directory and add your environment variables (use .env.example as a template):

    DISCORD_TOKEN=your_discord_bot_token
    CRCON_API_KEY=your_rcon_api_key
    CRCON_API_URL=your_rcon_api_url
    CHANNEL_ID=your_discord_channel_id
    
  4. Start the bot:

    node main.mjs

Features

  • Fetches player counts (Steam, Xbox/Epic, VIP) from an RCON API.
  • Displays player counts in a Discord embed, updated every 60 seconds.
  • Clears old messages in the specified channel on startup.
  • Handles errors gracefully with logging.

Environment Variables

Variable Description
DISCORD_TOKEN Discord bot token
CRCON_API_KEY RCON API key for the server
CRCON_API_URL RCON API URL for the server
CHANNEL_ID Discord channel ID for posting updates

License

MIT

About

A Discord bot that monitors hll player counts for a game server using an CRCON API and displays them in a Discord channel.

Resources

License

Stars

Watchers

Forks

Packages

No packages published