detritus-client-socket
TypeScript icon, indicating that this package has built-in type declarations

0.8.3 • Public • Published

Detritus Client Socket

npm

A pure-TypeScript low-level wrapper for just Discord's Gateway and Voice Connection.

usage

const { Gateway } = require('detritus-client-socket');

const token = '';
const client = new Gateway.Socket(token, {
  presence: {
    status: 'dnd',
  },
});

client.on('ready', () => {
  console.log('ready');
});

client.on('packet', (packet) => console.log('packet', packet));
client.on('close', (event) => console.log('client close', event));
client.on('warn', console.error);

client.connect('wss://gateway.discord.gg/');

Package Sidebar

Install

npm i detritus-client-socket

Weekly Downloads

297

Version

0.8.3

License

MIT

Unpacked Size

181 kB

Total Files

32

Last publish

Collaborators

  • cakedan