magmastream 2.8.6-dev.5 → 2.8.6-dev.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/dist/structures/Rest.js +6 -2
- package/package.json +1 -1
package/dist/structures/Rest.js
CHANGED
|
@@ -104,10 +104,14 @@ class Rest {
|
|
|
104
104
|
return response.data;
|
|
105
105
|
}
|
|
106
106
|
catch (error) {
|
|
107
|
-
if (error
|
|
107
|
+
if (!error.response) {
|
|
108
|
+
console.error("No response from node:", error.message);
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
if (error.response.data?.message === "Guild not found") {
|
|
108
112
|
return [];
|
|
109
113
|
}
|
|
110
|
-
else if (error
|
|
114
|
+
else if (error.response.status === 404) {
|
|
111
115
|
await this.node.destroy();
|
|
112
116
|
this.node.manager.createNode(this.node.options).connect();
|
|
113
117
|
}
|