Athena
Athena is a modern Discord library for Node.js, maintained by Team Hydra. It is a TypeScript rewrite descended from Eris, kept current with Discord's API...
Athena is a modern Discord library for Node.js, maintained by Team Hydra. It is a TypeScript rewrite descended from Eris, kept current with Discord's API (slash commands, message components V2, modals, monetization, threads, auto-moderation, scheduled events, soundboard, and more). It runs everything from a first hobby bot to bots in millions of servers.
This wiki is written for three kinds of reader. Jump to the track that fits you:
I am new to programming or JavaScript
Start here and go in order. Each page assumes nothing and builds on the last.
I can code, I just want to build a bot with Athena
- Getting started - install, project layout, first command
- Client options - every option, with defaults
- Intents - which events you receive
- Events - the full event catalogue
- Structures - guilds, members, messages, channels, interactions
- Slash commands - building and deploying commands
- Components - buttons, select menus, Components V2 layouts
- Modals - pop-up forms
- Webhook events - installs and entitlements over HTTP, no gateway needed
- The commands framework - the opinionated CommandClient
I run a large bot and need a reference
- REST and ratelimits - the request model, retries, file uploads
- Gateway and sharding - shards, concurrency, resuming
- Caching and memory - cache knobs, LRU, disabling caches
- Scaling to millions - clusters, Redis-backed caches, cross-cluster dedup
- Errors - error types and how to handle them
Reference and help
- Migrating from Eris
- FAQ
- Troubleshooting
- Glossary
- LLM and agent context - a compact summary to paste into AI coding tools
Install
Athena is published as athena-prime. Install it under the alias athena so every import stays from 'athena':
npm install athena@npm:athena-primeCompression and the WebSocket transport are built in, with nothing extra to install (Node 22.15+ required as of Athena 3.0). Run npm install ws only if you need proxy agents or custom headers via options.ws.
(A plain npm install athena resolves the frozen legacy 2.8.0 package, not current releases.)
A 12 line bot
import { Client, GatewayIntentBits } from 'athena';
const client = new Client(`Bot ${process.env.DISCORD_TOKEN}`, {
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent]
});
client.on('ready', () => console.log(`Logged in as ${client.user.username}`));
client.on('messageCreate', (message) => {
if (message.content === '!ping') void client.createMessage(message.channel.id, 'Pong!');
});
void client.connect();New here? Head to Your first bot for the same thing explained line by line.