Socket
Socket
Sign inDemoInstall

detritus-client-socket

Package Overview
Dependencies
30
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    detritus-client-socket

A TypeScript NodeJS library to interact with Discord's Gateway


Version published
Maintainers
1
Install size
1.06 MB
Created

Readme

Source

Detritus Client Socket

npm

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

  • API Documentation
  • npm

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

Keywords

FAQs

Last updated on 13 Sep 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc