oopscord.js 0.0.15 → 0.0.16
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/components/BaseButton.d.ts +1 -1
- package/dist/structures/components/BaseButton.d.ts.map +1 -1
- package/dist/structures/components/BaseButton.js +2 -2
- package/dist/structures/components/BaseModal.d.ts +2 -2
- package/dist/structures/components/BaseModal.d.ts.map +1 -1
- package/dist/structures/components/BaseModal.js +3 -3
- package/dist/structures/components/BaseSelectMenu.d.ts +2 -2
- package/dist/structures/components/BaseSelectMenu.d.ts.map +1 -1
- package/dist/structures/components/BaseSelectMenu.js +3 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../src/structures/components/BaseButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAe,MAAM,YAAY,CAAC;AAGxD,qBAAa,UAAU;;
|
|
1
|
+
{"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../src/structures/components/BaseButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAe,MAAM,YAAY,CAAC;AAGxD,qBAAa,UAAU;;IAGnB,MAAM,CAAC,SAAS;CAkCnB"}
|
|
@@ -4,8 +4,8 @@ exports.BaseButton = void 0;
|
|
|
4
4
|
const discord_js_1 = require("discord.js");
|
|
5
5
|
const __1 = require("..");
|
|
6
6
|
class BaseButton {
|
|
7
|
-
#button = null;
|
|
8
|
-
getButton() {
|
|
7
|
+
static #button = null;
|
|
8
|
+
static getButton() {
|
|
9
9
|
if (this.#button)
|
|
10
10
|
return this.#button;
|
|
11
11
|
const button = new discord_js_1.ButtonBuilder();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ModalBuilder } from "discord.js";
|
|
2
2
|
export declare class BaseModal {
|
|
3
3
|
#private;
|
|
4
|
-
getModal(): ModalBuilder;
|
|
5
|
-
withDefaultValues(...values: {
|
|
4
|
+
static getModal(): ModalBuilder;
|
|
5
|
+
static withDefaultValues(...values: {
|
|
6
6
|
customId: string;
|
|
7
7
|
value: string;
|
|
8
8
|
}[]): ModalBuilder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseModal.d.ts","sourceRoot":"","sources":["../../../src/structures/components/BaseModal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoD,YAAY,EAAE,MAAM,YAAY,CAAC;AAG5F,qBAAa,SAAS;;
|
|
1
|
+
{"version":3,"file":"BaseModal.d.ts","sourceRoot":"","sources":["../../../src/structures/components/BaseModal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoD,YAAY,EAAE,MAAM,YAAY,CAAC;AAG5F,qBAAa,SAAS;;IAGlB,MAAM,CAAC,QAAQ;IAoBf,MAAM,CAAC,iBAAiB,CAAC,GAAG,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE;CAc5E"}
|
|
@@ -4,8 +4,8 @@ exports.BaseModal = void 0;
|
|
|
4
4
|
const discord_js_1 = require("discord.js");
|
|
5
5
|
const __1 = require("..");
|
|
6
6
|
class BaseModal {
|
|
7
|
-
#modal = null;
|
|
8
|
-
getModal() {
|
|
7
|
+
static #modal = null;
|
|
8
|
+
static getModal() {
|
|
9
9
|
if (this.#modal)
|
|
10
10
|
return this.#modal;
|
|
11
11
|
const modal = new discord_js_1.ModalBuilder();
|
|
@@ -20,7 +20,7 @@ class BaseModal {
|
|
|
20
20
|
this.#modal = modal;
|
|
21
21
|
return modal;
|
|
22
22
|
}
|
|
23
|
-
withDefaultValues(...values) {
|
|
23
|
+
static withDefaultValues(...values) {
|
|
24
24
|
const modal = discord_js_1.ModalBuilder.from(this.getModal().toJSON());
|
|
25
25
|
modal.setComponents(modal.components.map(c => c.setComponents(c.components.map(input => {
|
|
26
26
|
const value = values.find(v => v.customId == input.data.custom_id);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ChannelSelectMenuBuilder, MentionableSelectMenuBuilder, RoleSelectMenuBuilder, StringSelectMenuBuilder, UserSelectMenuBuilder } from "discord.js";
|
|
2
2
|
export declare class BaseSelectMenu {
|
|
3
3
|
#private;
|
|
4
|
-
getSelectMenu(): StringSelectMenuBuilder | UserSelectMenuBuilder | RoleSelectMenuBuilder | ChannelSelectMenuBuilder | MentionableSelectMenuBuilder;
|
|
5
|
-
withValues(...values: {
|
|
4
|
+
static getSelectMenu(): StringSelectMenuBuilder | UserSelectMenuBuilder | RoleSelectMenuBuilder | ChannelSelectMenuBuilder | MentionableSelectMenuBuilder;
|
|
5
|
+
static withValues(...values: {
|
|
6
6
|
label: string;
|
|
7
7
|
value: string;
|
|
8
8
|
description?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseSelectMenu.d.ts","sourceRoot":"","sources":["../../../src/structures/components/BaseSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,wBAAwB,EAAiB,4BAA4B,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGpM,qBAAa,cAAc;;
|
|
1
|
+
{"version":3,"file":"BaseSelectMenu.d.ts","sourceRoot":"","sources":["../../../src/structures/components/BaseSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,wBAAwB,EAAiB,4BAA4B,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGpM,qBAAa,cAAc;;IAGvB,MAAM,CAAC,aAAa;IAkDpB,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE;CASxG"}
|
|
@@ -4,8 +4,8 @@ exports.BaseSelectMenu = void 0;
|
|
|
4
4
|
const discord_js_1 = require("discord.js");
|
|
5
5
|
const __1 = require("..");
|
|
6
6
|
class BaseSelectMenu {
|
|
7
|
-
#selectMenu = null;
|
|
8
|
-
getSelectMenu() {
|
|
7
|
+
static #selectMenu = null;
|
|
8
|
+
static getSelectMenu() {
|
|
9
9
|
if (this.#selectMenu)
|
|
10
10
|
return this.#selectMenu;
|
|
11
11
|
let selectMenu;
|
|
@@ -51,7 +51,7 @@ class BaseSelectMenu {
|
|
|
51
51
|
this.#selectMenu = selectMenu;
|
|
52
52
|
return selectMenu;
|
|
53
53
|
}
|
|
54
|
-
withValues(...values) {
|
|
54
|
+
static withValues(...values) {
|
|
55
55
|
if (this.getSelectMenu().data.type != discord_js_1.ComponentType.StringSelect)
|
|
56
56
|
throw new TypeError("withValues is only available for StringSelectMenu.");
|
|
57
57
|
const selectMenu = discord_js_1.StringSelectMenuBuilder.from(this.getSelectMenu().toJSON());
|