@sonoransoftware/sonoran.js 1.0.39 → 1.0.40
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/constants.d.ts
CHANGED
|
@@ -306,13 +306,13 @@ class REST extends events_1.EventEmitter {
|
|
|
306
306
|
throw new Error('ERLC_EXECUTE_COMMAND requires an array of command payloads.');
|
|
307
307
|
}
|
|
308
308
|
return payload.map((cmd) => {
|
|
309
|
-
const
|
|
310
|
-
if (typeof
|
|
311
|
-
throw new Error('ERLC_EXECUTE_COMMAND requires each command to include a valid
|
|
309
|
+
const robloxJoinCode = cmd.robloxJoinCode;
|
|
310
|
+
if (typeof robloxJoinCode !== 'string' || robloxJoinCode.length === 0) {
|
|
311
|
+
throw new Error('ERLC_EXECUTE_COMMAND requires each command to include a valid robloxJoinCode.');
|
|
312
312
|
}
|
|
313
313
|
return {
|
|
314
314
|
...cmd,
|
|
315
|
-
|
|
315
|
+
robloxJoinCode
|
|
316
316
|
};
|
|
317
317
|
});
|
|
318
318
|
}
|
|
@@ -639,15 +639,15 @@ class CMSManager extends BaseManager_1.BaseManager {
|
|
|
639
639
|
const args = cmd.args;
|
|
640
640
|
const discordId = cmd.discordId;
|
|
641
641
|
const includesPlayerNameOrId = cmd.includesPlayerNameOrId;
|
|
642
|
-
const
|
|
642
|
+
const robloxJoinCode = cmd.robloxJoinCode;
|
|
643
643
|
if (!type) {
|
|
644
644
|
throw new Error('Each ERLC command requires a type.');
|
|
645
645
|
}
|
|
646
646
|
if (!discordId) {
|
|
647
647
|
throw new Error('Each ERLC command requires a discordId.');
|
|
648
648
|
}
|
|
649
|
-
if (typeof
|
|
650
|
-
throw new Error('Each ERLC command requires a
|
|
649
|
+
if (typeof robloxJoinCode !== 'string' || robloxJoinCode.length === 0) {
|
|
650
|
+
throw new Error('Each ERLC command requires a robloxJoinCode.');
|
|
651
651
|
}
|
|
652
652
|
return {
|
|
653
653
|
...cmd,
|
|
@@ -655,7 +655,7 @@ class CMSManager extends BaseManager_1.BaseManager {
|
|
|
655
655
|
args,
|
|
656
656
|
discordId,
|
|
657
657
|
includesPlayerNameOrId,
|
|
658
|
-
|
|
658
|
+
robloxJoinCode,
|
|
659
659
|
};
|
|
660
660
|
});
|
|
661
661
|
return new Promise(async (resolve, reject) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonoransoftware/sonoran.js",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"description": "Sonoran.js is a library that allows you to interact with the Sonoran CAD and Sonoran CMS API. Based off of and utilizes several Discord.js library techniques for ease of use.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
package/src/constants.ts
CHANGED
|
@@ -410,13 +410,13 @@ export class REST extends EventEmitter {
|
|
|
410
410
|
throw new Error('ERLC_EXECUTE_COMMAND requires an array of command payloads.');
|
|
411
411
|
}
|
|
412
412
|
return payload.map((cmd) => {
|
|
413
|
-
const
|
|
414
|
-
if (typeof
|
|
415
|
-
throw new Error('ERLC_EXECUTE_COMMAND requires each command to include a valid
|
|
413
|
+
const robloxJoinCode = cmd.robloxJoinCode;
|
|
414
|
+
if (typeof robloxJoinCode !== 'string' || robloxJoinCode.length === 0) {
|
|
415
|
+
throw new Error('ERLC_EXECUTE_COMMAND requires each command to include a valid robloxJoinCode.');
|
|
416
416
|
}
|
|
417
417
|
return {
|
|
418
418
|
...cmd,
|
|
419
|
-
|
|
419
|
+
robloxJoinCode
|
|
420
420
|
};
|
|
421
421
|
});
|
|
422
422
|
}
|
|
@@ -575,7 +575,7 @@ export class CMSManager extends BaseManager {
|
|
|
575
575
|
const args = cmd.args;
|
|
576
576
|
const discordId = cmd.discordId;
|
|
577
577
|
const includesPlayerNameOrId = cmd.includesPlayerNameOrId;
|
|
578
|
-
const
|
|
578
|
+
const robloxJoinCode = cmd.robloxJoinCode;
|
|
579
579
|
|
|
580
580
|
if (!type) {
|
|
581
581
|
throw new Error('Each ERLC command requires a type.');
|
|
@@ -583,8 +583,8 @@ export class CMSManager extends BaseManager {
|
|
|
583
583
|
if (!discordId) {
|
|
584
584
|
throw new Error('Each ERLC command requires a discordId.');
|
|
585
585
|
}
|
|
586
|
-
if (typeof
|
|
587
|
-
throw new Error('Each ERLC command requires a
|
|
586
|
+
if (typeof robloxJoinCode !== 'string' || robloxJoinCode.length === 0) {
|
|
587
|
+
throw new Error('Each ERLC command requires a robloxJoinCode.');
|
|
588
588
|
}
|
|
589
589
|
|
|
590
590
|
return {
|
|
@@ -593,7 +593,7 @@ export class CMSManager extends BaseManager {
|
|
|
593
593
|
args,
|
|
594
594
|
discordId,
|
|
595
595
|
includesPlayerNameOrId,
|
|
596
|
-
|
|
596
|
+
robloxJoinCode,
|
|
597
597
|
};
|
|
598
598
|
});
|
|
599
599
|
|