@paqujs/ws
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

@paqujs/ws

WS module for Paqu.js

Installation

Node.js 16.x or higher is required.

npm install @paqujs/ws
yarn add @paqujs/ws
pnpm add @paqujs/ws

Usage

import { WebSocketManager } from '@paqujs/ws';

const ws = new WebSocketManager({ intents: ['Guilds'] });

ws.on('ready', (user) => {
    console.log(`Logged in as ${user.username}#${user.discriminator}`);
});

ws.connect('your-super-secret-token');

Optional Dependencies

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

Links

Package Sidebar

Install

npm i @paqujs/ws

Weekly Downloads

2

Version

1.2.3

License

Apache-2.0

Unpacked Size

41.4 kB

Total Files

10

Last publish

Collaborators

  • hanzydev