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

npm install athena
# optional, for gateway compression:
npm install zlib-sync

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.