Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shipgirlproject/vanguard
A drop in replacement for Discord.JS v14 websocket
https://github.com/shipgirlproject/vanguard
discord-bot discord-js discordjs discordjs-v14
Last synced: 3 months ago
JSON representation
A drop in replacement for Discord.JS v14 websocket
- Host: GitHub
- URL: https://github.com/shipgirlproject/vanguard
- Owner: shipgirlproject
- License: mit
- Created: 2023-01-19T06:58:43.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-01T08:23:46.000Z (over 1 year ago)
- Last Synced: 2024-03-30T12:40:24.102Z (10 months ago)
- Topics: discord-bot, discord-js, discordjs, discordjs-v14
- Language: TypeScript
- Homepage:
- Size: 64.5 KB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 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
```js
import { Client } from 'discord.js';
import { Inject } from 'vanguard';const client = new Client();
Inject(client, options);client.login('token');
```> Extending the original client
```js
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.