oopscord.js 0.0.17 → 0.0.18

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.
@@ -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.18",
4
4
  "description": "An easy way to make discord apps in typescript.",
5
5
  "main": "dist",
6
6
  "scripts": {