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.

  1. Installing Node and your tools
  2. JavaScript and TypeScript basics
  3. Your first bot
  4. The project template

I can code, I just want to build a bot with Athena

I run a large bot and need a reference

Reference and help

Install

Athena is published as athena-prime. Install it under the alias athena so every import stays from 'athena':

npm install athena@npm:athena-prime

Compression 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.