paqu.js
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

paqu.js

paqu.js is an easy-to-use Node.js library for interacting with the Discord API's.

Installation

Node.js 16.x or higher is required.

npm install paqu.js
yarn add paqu.js
pnpm add paqu.js

Features

  • Easy to use
  • Object-oriented
  • Lightweight
  • Fast
  • TypeScript support
  • 100% coverage of the Discord API

Optional Dependencies

  • zlib-sync for faster WebSocket data (de)compression
  • erlpack for faster WebSocket data (de)serialisation

Usage

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');

Links

Package Sidebar

Install

npm i paqu.js

Weekly Downloads

3

Version

1.4.0

License

Apache-2.0

Unpacked Size

502 kB

Total Files

236

Last publish

Collaborators

  • hanzydev