Skip to content

About

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

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

 
 

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 https://github.com/Neon-Genesis-Linux/pen-bot.git
    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 compose.yaml 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.

See CONTRIBUTING.md for what to read before editing, which checks to run and report, and the commit message format. If your change was written with AI or LLM tooling, AI_POLICY.md adds what to disclose and who stays responsible for it.

  • DOCUMENTATION.md - how documentation is written and where each kind belongs
  • docs/ - setup, architecture and operations

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

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages