Pen bot is a community-built Discord bot for the Neon Genesis Linux community, written in Go. It leverages Disgo for Discord integration.
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/containsmain.goentrypoints for all the resulting bot binaries:pen-fun/: the first bot, using thecommunitypackage
internal/contains reusable library packages:community/: community engagement and fun commandscore/: shared bot startup and common utilitiesmoderation/: 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.
- 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)
-
Clone the repository:
git clone <repository-url> cd pen-bot
-
(Optional) Use Nix for a consistent development environment:
nix develop
-
Install dependencies for the repository:
go mod tidy
Create a .env file in the root directory with your bot token:
BOT_TOKEN=your_bot_token_hereNote: Bot tokens are sensitive information. Manage them securely at the Discord Developer Portal.
Deploy the pen-fun bot using Docker Compose:
docker-compose upOr build the bot directly:
go build -o pen-fun ./cmd/pen-funThe docker-compose.yml file handles the build and deployment process with hot-reload for development.
Contributions are welcome! Please follow the established code style and include tests for new features.
This project is licensed under the MIT License - see the LICENSE file for details.
- Disgo - Discord library for Go
- Learn Go with Tests - Test-driven Go learning
- Golings - Learning Go exercises
- MCP for Developers - Go documentation tool for LLM agents
- Uber Go Style Guide - Go coding standards at Uber
- Golang Standards project layout