Skip to content

Neon-Genesis-Linux/pen-bot

Repository files navigation

pen-bot

License: MIT

Pen bot is a community-built Discord bot for the Neon Genesis Linux community, written in Go. It leverages Disgo for Discord integration.

Architecture

The repository structure follows the practices outlined in golang-standards/project-layout. It is a monorepo with a single root Go module and multiple bot binaries.

  • cmd/ contains main.go entrypoints for all the resulting bot binaries:
    • pen-fun/: the first bot, using the community package
  • internal/ contains reusable library packages:
    • community/: community engagement and fun commands
    • core/: shared bot startup and common utilities
    • moderation/: moderation actions

This design keeps shared code in one repository while letting each bot import only the packages it needs. Modules register their commands with the core registry for centralized dispatch.

Installation

Prerequisites

  • Go (see Learning Go for resources)
  • Docker and Docker Compose (for deployment)
    • Podman and Podman Compose can also be used
  • Nix (optional, for development environment)

Development Setup

  1. Clone the repository:

    git clone <repository-url>
    cd pen-bot
  2. (Optional) Use Nix for a consistent development environment:

    nix develop
  3. Install dependencies for the repository:

    go mod tidy

Usage

Configuration

Create a .env file in the root directory with your bot token:

BOT_TOKEN=your_bot_token_here

Note: Bot tokens are sensitive information. Manage them securely at the Discord Developer Portal.

Deployment

Deploy the pen-fun bot using Docker Compose:

docker-compose up

Or build the bot directly:

go build -o pen-fun ./cmd/pen-fun

The docker-compose.yml file handles the build and deployment process with hot-reload for development.

Contributing

Contributions are welcome! Please follow the established code style and include tests for new features.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Resources

About

Pen bot is a community built bot for https://discord.gg/nglinux written in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors