Skip to content
🐝

Lunibee 🐝

A lightweight, blazingly fast, Bun-first Discord API library for TypeScript. Zero fluff, strict typings, resilient WebSocket lifecycle, and compile-time-safe builders.

⚑ Bun-First Runtime

Built from the ground up for Bun. Native WebSocket performance, lightning-fast startup times, and minimal memory footprint.

πŸ›‘οΈ 100% Type-Safe

Complete TypeScript coverage with strict compile-time builders, Discord API v10 typing, and ergonomic autocomplete.

πŸ”„ Resilient Gateway

Automatic heartbeat ACK tracking, zombie connection detection, seamless session resume, and non-blocking reconnect cycles.

🎯 Bucket-Aware REST

Precise per-route Discord rate limit management with automatic retry backoff and non-leaking AbortSignal cancellations.

🧩 Modular Architecture

Split into lightweight independent packages (@lunibee/ws, @lunibee/rest, @lunibee/builders, etc.) so you only load what you need.

⚑ Zero Bloat

No bloated legacy dependencies. Pure, modern ESM designed for speed, clarity, and rock-solid production bots.


import { Client, GatewayIntentBits, EmbedBuilder } from "lunibee";
const client = new Client({
token: process.env.DISCORD_TOKEN!,
intents: GatewayIntentBits.Guilds | GatewayIntentBits.GuildMessages | GatewayIntentBits.MessageContent,
});
client.on("ready", (user) => {
console.log(`🐝 Logged in as ${user.username}!`);
});
client.on("messageCreate", async (message) => {
if (message.content === "!ping") {
const embed = new EmbedBuilder()
.setTitle("Pong! πŸ“")
.setDescription("Lunibee is buzzing along smoothly.")
.setColor(0xf59e0b)
.setTimestamp();
await message.reply({ embeds: [embed] });
}
});
await client.login();

You do not need to know Lunibee’s internals before using it. Start with the task you want to accomplish, then follow the relevant guide.

Send a message

await channel.send({ content: "Hello! 🐝" });

Edit a message

await message.edit({ content: "Updated!" });

Get the channel from a message

const channel = message.channel;

Change a channel name

await channel.editName("support");

Change a channel topic

await channel.editTopic("Support and help");

Move a channel to another category

await channel.editParent(categoryId);

The package pages below keep the same documentation structure, but each guide should answer the practical question first and then explain the underlying API.