oopscord.js 0.0.23 → 0.0.24
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiscordApp.d.ts","sourceRoot":"","sources":["../../src/structures/DiscordApp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsG,MAAM,EAAmI,MAAM,YAAY,CAAC;AAMzQ,OAAO,EAAc,MAAM,EAAE,MAAM,GAAG,CAAC;AAEvC,MAAM,WAAW,MAAM;IACnB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB;AAOD,qBAAa,iBAAiB;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;gBAEH,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAK1C,aAAa;IACb,QAAQ;CAGX;AAID,qBAAa,UAAU;;;IAuBb,KAAK;
|
|
1
|
+
{"version":3,"file":"DiscordApp.d.ts","sourceRoot":"","sources":["../../src/structures/DiscordApp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsG,MAAM,EAAmI,MAAM,YAAY,CAAC;AAMzQ,OAAO,EAAc,MAAM,EAAE,MAAM,GAAG,CAAC;AAEvC,MAAM,WAAW,MAAM;IACnB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB;AAOD,qBAAa,iBAAiB;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;gBAEH,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAK1C,aAAa;IACb,QAAQ;CAGX;AAID,qBAAa,UAAU;;;IAuBb,KAAK;IAyRX,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,iBAAiB,EAAE,OAAO,GAAE,iBAAsB;CAWzF"}
|
|
@@ -245,8 +245,9 @@ class DiscordApp {
|
|
|
245
245
|
const requiredOptions = options.filter(o => o.required);
|
|
246
246
|
const data = new discord_js_1.SlashCommandBuilder()
|
|
247
247
|
.setName(name)
|
|
248
|
-
.setDescription(description)
|
|
249
|
-
|
|
248
|
+
.setDescription(description);
|
|
249
|
+
if (integrationTypes.length > 0)
|
|
250
|
+
data.setIntegrationTypes(integrationTypes);
|
|
250
251
|
Reflect.set(data, "options", [...requiredOptions, ...options.filter(o => !o.required)]);
|
|
251
252
|
this.#module.logger.info(`├─ Mapped slash command ${name}.`);
|
|
252
253
|
return data.toJSON();
|
|
@@ -254,8 +255,9 @@ class DiscordApp {
|
|
|
254
255
|
#mapContextMenuCommand(name, type, integrationTypes = []) {
|
|
255
256
|
const data = new discord_js_1.ContextMenuCommandBuilder()
|
|
256
257
|
.setName(name)
|
|
257
|
-
.setType(type)
|
|
258
|
-
|
|
258
|
+
.setType(type);
|
|
259
|
+
if (integrationTypes.length > 0)
|
|
260
|
+
data.setIntegrationTypes(integrationTypes);
|
|
259
261
|
this.#module.logger.info(`├─ Mapped context command ${name}.`);
|
|
260
262
|
return data.toJSON();
|
|
261
263
|
}
|