Xenofic / Vanguard

A drop in replacement for Discord.JS v14 websocket

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vanguard

My own port or translation layer of @discordjs/ws to Discord.JS v14

Note: Some users said it works at Discord.JS v13

Example Usage

Without extending the original client

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

const client = new Client();
Inject(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);
        Inject(client, options);
    }
}

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

If you are using TS, please use (@ts-expect-error: reason why you are doing so) on applying this package.

About

A drop in replacement for Discord.JS v14 websocket

License:MIT License


Languages

Language:TypeScript 100.0%