0t4u / Vanguard

A drop in replacement for Discord.JS v14 websocket

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vanguard

A drop in replacement for Discord.JS v14 websocket system. This should not break anything in Discord.JS v14 (v13 is untested)

Example Usage

Without extending the original client

import { Client } from 'discord.js';
import { WebsocketProxy } from 'vanguard';

const client = new Client();
client.ws = new WebsocketProxy(client, options);

client.login('token');

Extending the original client

import { Client } from 'discord.js';
import { WebsocketProxy } from 'vanguard';

class Shipgirl extends Client {
    constructor(...args) {
        super(...args);
        this.ws = new WebsocketProxy(this, options);
    }
}

const client = new Shipgirl();
client.login('token');

About

A drop in replacement for Discord.JS v14 websocket

License:MIT License


Languages

Language:TypeScript 100.0%