Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

A pure-Typescript library to interact with Discord's Gateway

License

Notifications You must be signed in to change notification settings

detritusjs/client-socket

Open more actions menu

Repository files navigation

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

About

A pure-Typescript library to interact with Discord's Gateway

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Morty Proxy This is a proxified and sanitized view of the page, visit original site.