mirror of
https://github.com/danbulant/discord.js
synced 2026-07-09 13:10:42 +00:00
Webpack build for branch wsrewrite: a75d2efc291481f0cc96873bfd7aecca67e20291
This commit is contained in:
parent
3c5bf35210
commit
595c3779ba
2 changed files with 37 additions and 29 deletions
|
|
@ -24520,7 +24520,10 @@ class SequentialRequestHandler extends RequestHandler {
|
||||||
execute(item) {
|
execute(item) {
|
||||||
this.busy = true;
|
this.busy = true;
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
item.request.gen().end((err, res) => {
|
item.request
|
||||||
|
.gen()
|
||||||
|
.on('error', e => item.reject(e))
|
||||||
|
.end((err, res) => {
|
||||||
if (res && res.headers) {
|
if (res && res.headers) {
|
||||||
this.requestLimit = Number(res.headers['x-ratelimit-limit']);
|
this.requestLimit = Number(res.headers['x-ratelimit-limit']);
|
||||||
this.requestResetTime = Number(res.headers['x-ratelimit-reset']) * 1000;
|
this.requestResetTime = Number(res.headers['x-ratelimit-reset']) * 1000;
|
||||||
|
|
@ -24656,6 +24659,11 @@ class WebSocketManager extends EventEmitter {
|
||||||
return this.connection.destroy();
|
return this.connection.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
send(packet) {
|
||||||
|
if (!this.connection) return this.debug('No connection to websocket');
|
||||||
|
return this.connection.send(packet);
|
||||||
|
}
|
||||||
|
|
||||||
connect(gateway) {
|
connect(gateway) {
|
||||||
if (!this.connection) {
|
if (!this.connection) {
|
||||||
this.connection = new WebSocketConnection(this, gateway);
|
this.connection = new WebSocketConnection(this, gateway);
|
||||||
|
|
|
||||||
2
discord.wsrewrite.min.js
vendored
2
discord.wsrewrite.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue