@abdarrahmanabdelnasir/relay-node 0.1.12 → 0.1.13
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/relayClient.d.ts
CHANGED
package/dist/relayClient.js
CHANGED
|
@@ -22,9 +22,17 @@ export class RelayClient {
|
|
|
22
22
|
this.botId = res.data.botId;
|
|
23
23
|
return this.botId;
|
|
24
24
|
}
|
|
25
|
+
// Log error for debugging
|
|
26
|
+
if (!res.ok) {
|
|
27
|
+
console.error(`[commandless] registerBot failed: ${res.status} ${res.error || 'Unknown error'}`);
|
|
28
|
+
}
|
|
29
|
+
else if (!res.data?.botId) {
|
|
30
|
+
console.error(`[commandless] registerBot: response missing botId`, res.data);
|
|
31
|
+
}
|
|
25
32
|
return null;
|
|
26
33
|
}
|
|
27
|
-
catch {
|
|
34
|
+
catch (err) {
|
|
35
|
+
console.error(`[commandless] registerBot exception:`, err?.message || err);
|
|
28
36
|
return null;
|
|
29
37
|
}
|
|
30
38
|
}
|
package/dist-cjs/relayClient.js
CHANGED
|
@@ -25,9 +25,17 @@ class RelayClient {
|
|
|
25
25
|
this.botId = res.data.botId;
|
|
26
26
|
return this.botId;
|
|
27
27
|
}
|
|
28
|
+
// Log error for debugging
|
|
29
|
+
if (!res.ok) {
|
|
30
|
+
console.error(`[commandless] registerBot failed: ${res.status} ${res.error || 'Unknown error'}`);
|
|
31
|
+
}
|
|
32
|
+
else if (!res.data?.botId) {
|
|
33
|
+
console.error(`[commandless] registerBot: response missing botId`, res.data);
|
|
34
|
+
}
|
|
28
35
|
return null;
|
|
29
36
|
}
|
|
30
|
-
catch {
|
|
37
|
+
catch (err) {
|
|
38
|
+
console.error(`[commandless] registerBot exception:`, err?.message || err);
|
|
31
39
|
return null;
|
|
32
40
|
}
|
|
33
41
|
}
|