paqu.js is an easy-to-use Node.js library for interacting with the Discord API's.
Node.js 16.x or higher is required.
npm install paqu.js
yarn add paqu.js
pnpm add paqu.js
- Easy to use
- Object-oriented
- Lightweight
- Fast
- TypeScript support
- 100% coverage of the Discord API
- zlib-sync for faster WebSocket data (de)compression
- erlpack for faster WebSocket data (de)serialisation
import { Client } from 'paqu.js';
const client = new Client({
ws: {
intents: ['Guilds', 'GuildMessages', 'MessageContent'],
},
});
client.ws.on('ready', () => {
console.log(`Logged in as ${client.user.username}!`);
});
client.ws.on('messageCreate', (message) => {
if (message.content === '!ping') {
message.reply({
content: `Pong! :ping_pong: **${client.ws.ping}ms**`,
});
}
});
client.ws.connect('your-super-secret-token');