Skip to content

Architecture & Packages Overview

Lunibee is organized into focused packages, but you do not need to understand the whole architecture to build a bot.

For a normal bot, start with the lunibee package. It gives you the high-level client and the common APIs. Reach for an individual @lunibee/* package when you need a specific low-level feature.

Layer 4: lunibee (recommended entry point)
β”‚
Layer 3: @lunibee/core
β”‚
Layer 2: @lunibee/managers ◄─── @lunibee/collection
β”‚
Layer 1: @lunibee/structures ◄─ @lunibee/builders, @lunibee/rest, @lunibee/ws
β”‚
Layer 0: @lunibee/types, @lunibee/utils, @lunibee/formatters
If you want to… Start with
Build a normal Discord bot lunibee
Listen to events and manage the client @lunibee/core
Send/edit/delete messages and work with resources @lunibee/structures
Build commands, embeds, buttons, selects, or modals @lunibee/builders
Call a Discord endpoint directly @lunibee/rest
Work with caches or ID-based operations @lunibee/managers / @lunibee/collection
Use Discord API types and constants @lunibee/types
Connect directly to the Gateway @lunibee/ws
Run multiple Gateway shards @lunibee/sharding
Work with Discord voice @lunibee/voice
Format mentions and timestamps @lunibee/formatters
Use shared low-level helpers @lunibee/utils
Package Purpose
lunibee High-level bot client and public facade
@lunibee/core Client lifecycle, events, Gateway, REST, and managers
@lunibee/ws WebSocket Gateway connection and heartbeat lifecycle
@lunibee/rest Bucket-aware REST client and route definitions
@lunibee/builders Validated embeds, commands, components, modals, and attachments
@lunibee/managers Resource caches and ID-based operations
@lunibee/structures Guild, Channel, Message, User, and Member resources
@lunibee/collection In-memory collections and bounded caches
@lunibee/sharding Multi-shard management and inter-shard communication
@lunibee/voice Discord Voice connection and audio primitives
@lunibee/formatters Mentions, timestamps, and Markdown helpers
@lunibee/utils Shared low-level utilities
@lunibee/types Discord API v10 types and constants

The package pages explain the public API and include examples. Start with the package that matches the task you are trying to accomplish; you can always move to a lower layer later.