@jnode/discord 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/client.js +3 -2
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -90,7 +90,7 @@ class DiscordClient {
|
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
const res = await request(method, this.apiUrl(path), {
|
|
93
|
+
const res = await request.request(method, this.apiUrl(path), {
|
|
94
94
|
'Authorization': `Bot ${this.token}`,
|
|
95
95
|
'User-Agent': 'DiscordBot',
|
|
96
96
|
'Content-Type': 'multipart/form-data; boundary=----JustDiscordFormBoundary'
|
|
@@ -108,9 +108,10 @@ class DiscordClient {
|
|
|
108
108
|
return res;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
async connectGateway() {
|
|
111
|
+
async connectGateway(cb) {
|
|
112
112
|
await this.gateway.getGatewayUrl();
|
|
113
113
|
this.gateway.connect();
|
|
114
|
+
cb(this.gateway);
|
|
114
115
|
return this.gateway;
|
|
115
116
|
}
|
|
116
117
|
}
|