oopscord.js 0.0.17 → 0.0.19

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,EAAgF,MAAM,YAAY,CAAC;AAMtN,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;IAwPX,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,iBAAiB,EAAE,OAAO,GAAE,iBAAsB;CAWzF"}
1
+ {"version":3,"file":"DiscordApp.d.ts","sourceRoot":"","sources":["../../src/structures/DiscordApp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsG,MAAM,EAAgF,MAAM,YAAY,CAAC;AAMtN,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;IA4PX,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,iBAAiB,EAAE,OAAO,GAAE,iBAAsB;CAWzF"}
@@ -188,6 +188,12 @@ class DiscordApp {
188
188
  else if (itr.isButton()) {
189
189
  this.#buttonHandler(itr);
190
190
  }
191
+ else if (itr.isAnySelectMenu()) {
192
+ this.#selectMenuHandler(itr);
193
+ }
194
+ else if (itr.isModalSubmit()) {
195
+ this.#modalHandler(itr);
196
+ }
191
197
  }
192
198
  #init() {
193
199
  const options = Reflect.getMetadata(Constants_1.DICSORD_MODULE_OPTIONS_KEY, this.#moduleFunction);
@@ -9,7 +9,7 @@ class BaseButton {
9
9
  if (this.button)
10
10
  return this.button;
11
11
  const button = new discord_js_1.ButtonBuilder();
12
- const options = Reflect.getMetadata(__1.BUTTON_OPTIONS_KEY, this.constructor);
12
+ const options = Reflect.getMetadata(__1.BUTTON_OPTIONS_KEY, this);
13
13
  if (!options)
14
14
  throw new TypeError("Failed to get the button.");
15
15
  if (options.style == discord_js_1.ButtonStyle.Premium) {
@@ -9,8 +9,8 @@ class BaseModal {
9
9
  if (this.modal)
10
10
  return this.modal;
11
11
  const modal = new discord_js_1.ModalBuilder();
12
- const options = Reflect.getMetadata(__1.MODAL_OPTIONS_KEY, this.constructor);
13
- const components = Reflect.getMetadata(__1.MODAL_COMPONENTS_KEY, this.constructor) ?? [];
12
+ const options = Reflect.getMetadata(__1.MODAL_OPTIONS_KEY, this);
13
+ const components = Reflect.getMetadata(__1.MODAL_COMPONENTS_KEY, this) ?? [];
14
14
  if (!options)
15
15
  throw new TypeError("Failed to get the modal.");
16
16
  modal
@@ -9,8 +9,8 @@ class BaseSelectMenu {
9
9
  if (this.selelctMenu)
10
10
  return this.selelctMenu;
11
11
  let selectMenu;
12
- const type = Reflect.getMetadata(__1.SELECT_MENU_TYPE_KEY, this.constructor);
13
- const options = Reflect.getMetadata(__1.SELECT_MENU_OPTIONS_KEY, this.constructor);
12
+ const type = Reflect.getMetadata(__1.SELECT_MENU_TYPE_KEY, this);
13
+ const options = Reflect.getMetadata(__1.SELECT_MENU_OPTIONS_KEY, this);
14
14
  if (!options)
15
15
  throw new TypeError("Failed to get the select menu.");
16
16
  switch (type) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oopscord.js",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "description": "An easy way to make discord apps in typescript.",
5
5
  "main": "dist",
6
6
  "scripts": {