More than just a Discord API Wrapper.
Node-discord is a strict TypeScript Discord API Wrapper that focuses on utility and extensibility.
The library implements every core aspect of the Discord API and provides additional tools to assist developers with their needs.
Getting Started
Install the library using NPM or Yarn:
$ npm install @node-discord/core
$ yarn add @node-discord/core
Quick Code Example
Here is a short code example to initialize a Bot and connect it to the Discord gateway.
const { Bot, BotEvent } = require('@node-discord/core');
const bot = new Bot('YOUR BOT TOKEN');
bot.events.on(BotEvent.Ready, () => {
console.log('Ready!');
});
bot.connect();
Features
Coming Features
Optional Libraries
There are multiple optional libraries which could be installed in addition to node-discord to improve performance.
- erlpack - Provides fast encoding and decoding for WebSocket payloads.
- zlib-sync - Compresses and decompresses WebSocket payloads before attempting to parse them.