Sign inSign up

alh477/demod-bot

By alh477

Updated 9 months ago

This bot serves as the primary user gateway for the DeMoD Game Server Network

Image
API management
Internet of things
Developer tools
0

342

alh477/demod-bot repository overview

DeMoD GSN Discord Bot

GitHub

DeMoD Game Server Network is a high-performance Discord interface built on the Deno runtime. It provides seamless integration with the DCF (Distributed Computing Framework) ecosystem for automated game server management, bandwidth tracking, and Stripe-powered billing.

Overview

This bot serves as the primary user gateway for the DeMoD Game Server Network. It allows users to:

  • Link Accounts: Securely connect Discord IDs to DCF-ID via OAuth.
  • Manage Servers: Start, stop, and join game servers directly from Discord commands.
  • Monitor Usage: Real-time tracking of bandwidth usage (free tier vs. paid overage).
  • Billing Integration: Direct links to add credits via Stripe for extended gameplay.

Key Features

  • Deno Native: Leverages the security and speed of the Deno runtime.
  • Docker Ready: Includes a lightweight Alpine-based Dockerfile for easy deployment.
  • Metered Access: Integrated logic for a 128 MB free tier and $0.05/GB overage pricing.
  • High Availability: Built-in Discord Gateway RESUME support and health check endpoints.

Tech Stack

  • Runtime: Deno
  • Language: TypeScript
  • Containerization: Docker (Alpine Linux)
  • Integrations: DCF-ID, Stripe, Discord API v10

Installation & Setup

Prerequisites
  • Deno 2.1.4+ or Docker
  • A Discord Bot Token (with MESSAGE_CONTENT intent enabled)
Configuration

The bot is configured via environment variables:

VariableDescription
DISCORD_TOKENYour Discord bot token
BOT_PREFIXCommand prefix (default: !gs)
SELECTOR_URLURL for the GSN Server Selector
DCF_ID_URLURL for the Identity Service
DCF_PUBLIC_URLPublic-facing URL for user web dashboards
Quick Start (Docker)
docker build -t demod-bot .
docker run -d --env-file .env demod-bot

Make It Your Own

This repository is more than just a bot—it's a foundation. We built this to solve the complex problem of metered game server access, but the "DeMoD twist" is just the beginning.

We explicitly urge you to fork this repo and add your own flavor:

  • New Games: Add support for specialized game server types.
  • Custom UI: Overhaul the Discord Embeds for a unique look.
  • Alternative Billing: Swap Stripe for your preferred payment provider.
  • Expanded Commands: Build new social features around your gaming community.

The core infrastructure is here. Use it, break it, and build something better.

License: BSD 3-Clause

Copyright (c) 2025, DeMoD LLC

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Tag summary

Content type

Image

Digest

sha256:16ba4264a

Size

54.6 MB

Last updated

9 months ago

docker pull alh477/demod-bot