@mostfeatured/dbi 0.0.39 → 0.0.41

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.
@@ -11,6 +11,6 @@ export declare class DBIButton extends DBIBaseInteraction {
11
11
  constructor(dbi: DBI, args: TDBIButtonOmitted);
12
12
  options?: Omit<Discord.ButtonComponentData, "customId" | "type">;
13
13
  onExecute(ctx: IDBIButtonExecuteCtx): Promise<any> | any;
14
- toJSON(arg?: IDBIToJSONArgs<Discord.ButtonComponentData>): Discord.ButtonComponentData;
14
+ toJSON(arg?: IDBIToJSONArgs<Omit<Discord.ButtonComponentData, "customId" | "type">>): Discord.ButtonComponentData;
15
15
  }
16
16
  //# sourceMappingURL=Button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/types/Button.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE3F,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D,WAAW,EAAE,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACjD,IAAI,EAAE,kBAAkB,EAAE,CAAC;CAC5B;AAED,oBAAY,iBAAiB,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,GAAG,KAAK,GAAG,QAAQ,CAAC,CAAC;AAE3F,qBAAa,SAAU,SAAQ,kBAAkB;gBACnC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,iBAAiB;IAOrC,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC;IAEhE,SAAS,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG;IACjE,MAAM,CAAC,GAAG,GAAE,cAAc,CAAC,OAAO,CAAC,mBAAmB,CAAa,GAAG,OAAO,CAAC,mBAAmB;CAOlG"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/types/Button.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE3F,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D,WAAW,EAAE,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACjD,IAAI,EAAE,kBAAkB,EAAE,CAAC;CAC5B;AAED,oBAAY,iBAAiB,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,GAAG,KAAK,GAAG,QAAQ,CAAC,CAAC;AAE3F,qBAAa,SAAU,SAAQ,kBAAkB;gBACnC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,iBAAiB;IAOrC,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC;IAEhE,SAAS,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG;IACjE,MAAM,CAAC,GAAG,GAAE,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,UAAU,GAAG,MAAM,CAAC,CAAa,GAAG,OAAO,CAAC,mBAAmB;CAO7H"}
@@ -16,7 +16,7 @@ class DBIButton extends Interaction_1.DBIBaseInteraction {
16
16
  return {
17
17
  ...this.options,
18
18
  ...(arg?.override || {}),
19
- customId: (0, customId_1.customIdBuilder)(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.tll)
19
+ customId: (0, customId_1.customIdBuilder)(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.ttl)
20
20
  };
21
21
  }
22
22
  ;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/types/Button.ts"],"names":[],"mappings":";;;AAEA,+CAA2F;AAC3F,gDAAoD;AAUpD,MAAa,SAAU,SAAQ,gCAAkB;IAC/C,YAAY,GAAQ,EAAE,IAAuB;QAC3C,KAAK,CAAC,GAAG,EAAE;YACT,GAAI,IAAY;YAChB,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;IACL,CAAC;IAIQ,SAAS,CAAC,GAAyB,IAAwB,CAAC;IAAA,CAAC;IACtE,MAAM,CAAC,MAAmD,EAAS;QACjE,OAAO;YACL,GAAG,IAAI,CAAC,OAAO;YACf,GAAG,CAAC,GAAG,EAAE,QAAQ,IAAI,EAAE,CAAC;YACxB,QAAQ,EAAE,IAAA,0BAAe,EAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC;SACzF,CAAC;IACX,CAAC;IAAA,CAAC;CACH;AAlBD,8BAkBC","sourcesContent":["import Discord from \"discord.js\";\r\nimport { DBI } from \"../DBI\";\r\nimport { DBIBaseInteraction, IDBIBaseExecuteCtx, TDBIReferencedData } from \"./Interaction\";\r\nimport { customIdBuilder } from \"../utils/customId\";\r\nimport { IDBIToJSONArgs } from \"../utils/UtilTypes\";\r\n\r\nexport interface IDBIButtonExecuteCtx extends IDBIBaseExecuteCtx {\r\n interaction: Discord.ButtonInteraction<\"cached\">;\r\n data: TDBIReferencedData[];\r\n}\r\n\r\nexport type TDBIButtonOmitted = Omit<DBIButton, \"type\" | \"description\" | \"dbi\" | \"toJSON\">;\r\n\r\nexport class DBIButton extends DBIBaseInteraction {\r\n constructor(dbi: DBI, args: TDBIButtonOmitted) {\r\n super(dbi, {\r\n ...(args as any),\r\n type: \"Button\",\r\n });\r\n }\r\n\r\n declare options?: Omit<Discord.ButtonComponentData, \"customId\" | \"type\">;\r\n\r\n override onExecute(ctx: IDBIButtonExecuteCtx): Promise<any> | any { };\r\n toJSON(arg: IDBIToJSONArgs<Discord.ButtonComponentData> = {} as any): Discord.ButtonComponentData {\r\n return {\r\n ...this.options,\r\n ...(arg?.override || {}),\r\n customId: customIdBuilder(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.tll)\r\n } as any;\r\n };\r\n}"]}
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/types/Button.ts"],"names":[],"mappings":";;;AAEA,+CAA2F;AAC3F,gDAAoD;AAUpD,MAAa,SAAU,SAAQ,gCAAkB;IAC/C,YAAY,GAAQ,EAAE,IAAuB;QAC3C,KAAK,CAAC,GAAG,EAAE;YACT,GAAI,IAAY;YAChB,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;IACL,CAAC;IAIQ,SAAS,CAAC,GAAyB,IAAwB,CAAC;IAAA,CAAC;IACtE,MAAM,CAAC,MAA8E,EAAS;QAC5F,OAAO;YACL,GAAG,IAAI,CAAC,OAAO;YACf,GAAG,CAAC,GAAG,EAAE,QAAQ,IAAI,EAAE,CAAC;YACxB,QAAQ,EAAE,IAAA,0BAAe,EAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC;SACzF,CAAC;IACX,CAAC;IAAA,CAAC;CACH;AAlBD,8BAkBC","sourcesContent":["import Discord from \"discord.js\";\r\nimport { DBI } from \"../DBI\";\r\nimport { DBIBaseInteraction, IDBIBaseExecuteCtx, TDBIReferencedData } from \"./Interaction\";\r\nimport { customIdBuilder } from \"../utils/customId\";\r\nimport { IDBIToJSONArgs } from \"../utils/UtilTypes\";\r\n\r\nexport interface IDBIButtonExecuteCtx extends IDBIBaseExecuteCtx {\r\n interaction: Discord.ButtonInteraction<\"cached\">;\r\n data: TDBIReferencedData[];\r\n}\r\n\r\nexport type TDBIButtonOmitted = Omit<DBIButton, \"type\" | \"description\" | \"dbi\" | \"toJSON\">;\r\n\r\nexport class DBIButton extends DBIBaseInteraction {\r\n constructor(dbi: DBI, args: TDBIButtonOmitted) {\r\n super(dbi, {\r\n ...(args as any),\r\n type: \"Button\",\r\n });\r\n }\r\n\r\n declare options?: Omit<Discord.ButtonComponentData, \"customId\" | \"type\">;\r\n\r\n override onExecute(ctx: IDBIButtonExecuteCtx): Promise<any> | any { };\r\n toJSON(arg: IDBIToJSONArgs<Omit<Discord.ButtonComponentData, \"customId\" | \"type\">> = {} as any): Discord.ButtonComponentData {\r\n return {\r\n ...this.options,\r\n ...(arg?.override || {}),\r\n customId: customIdBuilder(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.ttl)\r\n } as any;\r\n };\r\n}"]}
@@ -16,7 +16,7 @@ class DBIModal extends Interaction_1.DBIBaseInteraction {
16
16
  return {
17
17
  ...this.options,
18
18
  ...(arg?.override || {}),
19
- customId: (0, customId_1.customIdBuilder)(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.tll)
19
+ customId: (0, customId_1.customIdBuilder)(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.ttl)
20
20
  };
21
21
  }
22
22
  ;
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../src/types/Modal.ts"],"names":[],"mappings":";;;AACA,+CAA2F;AAE3F,gDAAoD;AAgBpD,MAAa,QAAS,SAAQ,gCAAkB;IAC9C,YAAY,GAAQ,EAAE,IAAsB;QAC1C,KAAK,CAAC,GAAG,EAAE;YACT,GAAI,IAAY;YAChB,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;IACL,CAAC;IAIQ,SAAS,CAAC,GAAwB,IAAwB,CAAC;IAAA,CAAC;IAErE,MAAM,CAAC,MAA0C,EAAS;QACxD,OAAO;YACL,GAAG,IAAI,CAAC,OAAO;YACf,GAAG,CAAC,GAAG,EAAE,QAAQ,IAAI,EAAE,CAAC;YACxB,QAAQ,EAAE,IAAA,0BAAe,EAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC;SACzF,CAAC;IACX,CAAC;IAAA,CAAC;CACH;AAnBD,4BAmBC","sourcesContent":["import { DBI } from \"../DBI\";\r\nimport { DBIBaseInteraction, IDBIBaseExecuteCtx, TDBIReferencedData } from \"./Interaction\";\r\nimport Discord from \"discord.js\";\r\nimport { customIdBuilder } from \"../utils/customId\";\r\nimport { IDBIToJSONArgs } from \"../utils/UtilTypes\";\r\n\r\nexport interface IDBIModalExecuteCtx extends IDBIBaseExecuteCtx {\r\n interaction: Discord.ModalSubmitInteraction<\"cached\">;\r\n\r\n data: TDBIReferencedData[];\r\n}\r\n\r\nexport interface ModalComponentData {\r\n title: string;\r\n components: (Discord.ActionRowData<Discord.ModalActionRowComponentData>)[];\r\n}\r\n\r\nexport type TDBIModalOmitted = Omit<DBIModal, \"type\" | \"description\" | \"dbi\" | \"toJSON\">;\r\n\r\nexport class DBIModal extends DBIBaseInteraction {\r\n constructor(dbi: DBI, args: TDBIModalOmitted) {\r\n super(dbi, {\r\n ...(args as any),\r\n type: \"Modal\"\r\n });\r\n }\r\n\r\n declare options: ModalComponentData;\r\n\r\n override onExecute(ctx: IDBIModalExecuteCtx): Promise<any> | any { };\r\n\r\n toJSON(arg: IDBIToJSONArgs<ModalComponentData> = {} as any): Discord.ModalComponentData {\r\n return {\r\n ...this.options,\r\n ...(arg?.override || {}),\r\n customId: customIdBuilder(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.tll)\r\n } as any;\r\n };\r\n}"]}
1
+ {"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../src/types/Modal.ts"],"names":[],"mappings":";;;AACA,+CAA2F;AAE3F,gDAAoD;AAgBpD,MAAa,QAAS,SAAQ,gCAAkB;IAC9C,YAAY,GAAQ,EAAE,IAAsB;QAC1C,KAAK,CAAC,GAAG,EAAE;YACT,GAAI,IAAY;YAChB,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;IACL,CAAC;IAIQ,SAAS,CAAC,GAAwB,IAAwB,CAAC;IAAA,CAAC;IAErE,MAAM,CAAC,MAA0C,EAAS;QACxD,OAAO;YACL,GAAG,IAAI,CAAC,OAAO;YACf,GAAG,CAAC,GAAG,EAAE,QAAQ,IAAI,EAAE,CAAC;YACxB,QAAQ,EAAE,IAAA,0BAAe,EAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC;SACzF,CAAC;IACX,CAAC;IAAA,CAAC;CACH;AAnBD,4BAmBC","sourcesContent":["import { DBI } from \"../DBI\";\r\nimport { DBIBaseInteraction, IDBIBaseExecuteCtx, TDBIReferencedData } from \"./Interaction\";\r\nimport Discord from \"discord.js\";\r\nimport { customIdBuilder } from \"../utils/customId\";\r\nimport { IDBIToJSONArgs } from \"../utils/UtilTypes\";\r\n\r\nexport interface IDBIModalExecuteCtx extends IDBIBaseExecuteCtx {\r\n interaction: Discord.ModalSubmitInteraction<\"cached\">;\r\n\r\n data: TDBIReferencedData[];\r\n}\r\n\r\nexport interface ModalComponentData {\r\n title: string;\r\n components: (Discord.ActionRowData<Discord.ModalActionRowComponentData>)[];\r\n}\r\n\r\nexport type TDBIModalOmitted = Omit<DBIModal, \"type\" | \"description\" | \"dbi\" | \"toJSON\">;\r\n\r\nexport class DBIModal extends DBIBaseInteraction {\r\n constructor(dbi: DBI, args: TDBIModalOmitted) {\r\n super(dbi, {\r\n ...(args as any),\r\n type: \"Modal\"\r\n });\r\n }\r\n\r\n declare options: ModalComponentData;\r\n\r\n override onExecute(ctx: IDBIModalExecuteCtx): Promise<any> | any { };\r\n\r\n toJSON(arg: IDBIToJSONArgs<ModalComponentData> = {} as any): Discord.ModalComponentData {\r\n return {\r\n ...this.options,\r\n ...(arg?.override || {}),\r\n customId: customIdBuilder(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.ttl)\r\n } as any;\r\n };\r\n}"]}
@@ -11,6 +11,6 @@ export declare class DBISelectMenu extends DBIBaseInteraction {
11
11
  constructor(dbi: DBI, args: TDBISelectMenuOmitted);
12
12
  options: Omit<Discord.SelectMenuComponentData, "customId" | "type">;
13
13
  onExecute(ctx: IDBISelectMenuExecuteCtx): Promise<any> | any;
14
- toJSON(arg?: IDBIToJSONArgs<Discord.SelectMenuComponentData>): Discord.SelectMenuComponentData;
14
+ toJSON(arg?: IDBIToJSONArgs<Omit<Discord.SelectMenuComponentData, "customId" | "type">>): Discord.SelectMenuComponentData;
15
15
  }
16
16
  //# sourceMappingURL=SelectMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectMenu.d.ts","sourceRoot":"","sources":["../../src/types/SelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE3F,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,WAAW,wBAAyB,SAAQ,kBAAkB;IAClE,WAAW,EAAE,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACjD,IAAI,EAAE,kBAAkB,EAAE,CAAC;CAC5B;AAED,oBAAY,qBAAqB,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,aAAa,GAAG,KAAK,GAAG,QAAQ,CAAC,CAAC;AAEnG,qBAAa,aAAc,SAAQ,kBAAkB;gBACvC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,qBAAqB;IAOzC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,uBAAuB,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC;IAEnE,SAAS,CAAC,GAAG,EAAE,wBAAwB,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG;IAErE,MAAM,CAAC,GAAG,GAAE,cAAc,CAAC,OAAO,CAAC,uBAAuB,CAAa,GAAG,OAAO,CAAC,uBAAuB;CAO1G"}
1
+ {"version":3,"file":"SelectMenu.d.ts","sourceRoot":"","sources":["../../src/types/SelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE3F,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,WAAW,wBAAyB,SAAQ,kBAAkB;IAClE,WAAW,EAAE,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACjD,IAAI,EAAE,kBAAkB,EAAE,CAAC;CAC5B;AAED,oBAAY,qBAAqB,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,aAAa,GAAG,KAAK,GAAG,QAAQ,CAAC,CAAC;AAEnG,qBAAa,aAAc,SAAQ,kBAAkB;gBACvC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,qBAAqB;IAOzC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,uBAAuB,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC;IAEnE,SAAS,CAAC,GAAG,EAAE,wBAAwB,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG;IAErE,MAAM,CAAC,GAAG,GAAE,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,EAAE,UAAU,GAAG,MAAM,CAAC,CAAa,GAAG,OAAO,CAAC,uBAAuB;CAOrI"}
@@ -16,7 +16,7 @@ class DBISelectMenu extends Interaction_1.DBIBaseInteraction {
16
16
  return {
17
17
  ...this.options,
18
18
  ...(arg?.override || {}),
19
- customId: (0, customId_1.customIdBuilder)(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.tll)
19
+ customId: (0, customId_1.customIdBuilder)(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.ttl)
20
20
  };
21
21
  }
22
22
  ;
@@ -1 +1 @@
1
- {"version":3,"file":"SelectMenu.js","sourceRoot":"","sources":["../../src/types/SelectMenu.ts"],"names":[],"mappings":";;;AAEA,+CAA2F;AAC3F,gDAAoD;AAUpD,MAAa,aAAc,SAAQ,gCAAkB;IACnD,YAAY,GAAQ,EAAE,IAA2B;QAC/C,KAAK,CAAC,GAAG,EAAE;YACT,GAAI,IAAY;YAChB,IAAI,EAAE,YAAY;SACnB,CAAC,CAAC;IACL,CAAC;IAIQ,SAAS,CAAC,GAA6B,IAAwB,CAAC;IAAA,CAAC;IAE1E,MAAM,CAAC,MAAuD,EAAS;QACrE,OAAO;YACL,GAAG,IAAI,CAAC,OAAO;YACf,GAAG,CAAC,GAAG,EAAE,QAAQ,IAAI,EAAE,CAAC;YACxB,QAAQ,EAAE,IAAA,0BAAe,EAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC;SACzF,CAAC;IACX,CAAC;IAAA,CAAC;CACH;AAnBD,sCAmBC","sourcesContent":["import Discord from \"discord.js\";\r\nimport { DBI } from \"../DBI\";\r\nimport { DBIBaseInteraction, IDBIBaseExecuteCtx, TDBIReferencedData } from \"./Interaction\";\r\nimport { customIdBuilder } from \"../utils/customId\";\r\nimport { IDBIToJSONArgs } from \"../utils/UtilTypes\";\r\n\r\nexport interface IDBISelectMenuExecuteCtx extends IDBIBaseExecuteCtx {\r\n interaction: Discord.ButtonInteraction<\"cached\">;\r\n data: TDBIReferencedData[];\r\n}\r\n\r\nexport type TDBISelectMenuOmitted = Omit<DBISelectMenu, \"type\" | \"description\" | \"dbi\" | \"toJSON\">;\r\n\r\nexport class DBISelectMenu extends DBIBaseInteraction {\r\n constructor(dbi: DBI, args: TDBISelectMenuOmitted) {\r\n super(dbi, {\r\n ...(args as any),\r\n type: \"SelectMenu\",\r\n });\r\n }\r\n\r\n declare options: Omit<Discord.SelectMenuComponentData, \"customId\" | \"type\">;\r\n\r\n override onExecute(ctx: IDBISelectMenuExecuteCtx): Promise<any> | any { };\r\n\r\n toJSON(arg: IDBIToJSONArgs<Discord.SelectMenuComponentData> = {} as any): Discord.SelectMenuComponentData {\r\n return {\r\n ...this.options,\r\n ...(arg?.override || {}),\r\n customId: customIdBuilder(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.tll)\r\n } as any;\r\n };\r\n}"]}
1
+ {"version":3,"file":"SelectMenu.js","sourceRoot":"","sources":["../../src/types/SelectMenu.ts"],"names":[],"mappings":";;;AAEA,+CAA2F;AAC3F,gDAAoD;AAUpD,MAAa,aAAc,SAAQ,gCAAkB;IACnD,YAAY,GAAQ,EAAE,IAA2B;QAC/C,KAAK,CAAC,GAAG,EAAE;YACT,GAAI,IAAY;YAChB,IAAI,EAAE,YAAY;SACnB,CAAC,CAAC;IACL,CAAC;IAIQ,SAAS,CAAC,GAA6B,IAAwB,CAAC;IAAA,CAAC;IAE1E,MAAM,CAAC,MAAkF,EAAS;QAChG,OAAO;YACL,GAAG,IAAI,CAAC,OAAO;YACf,GAAG,CAAC,GAAG,EAAE,QAAQ,IAAI,EAAE,CAAC;YACxB,QAAQ,EAAE,IAAA,0BAAe,EAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC;SACzF,CAAC;IACX,CAAC;IAAA,CAAC;CACH;AAnBD,sCAmBC","sourcesContent":["import Discord from \"discord.js\";\r\nimport { DBI } from \"../DBI\";\r\nimport { DBIBaseInteraction, IDBIBaseExecuteCtx, TDBIReferencedData } from \"./Interaction\";\r\nimport { customIdBuilder } from \"../utils/customId\";\r\nimport { IDBIToJSONArgs } from \"../utils/UtilTypes\";\r\n\r\nexport interface IDBISelectMenuExecuteCtx extends IDBIBaseExecuteCtx {\r\n interaction: Discord.ButtonInteraction<\"cached\">;\r\n data: TDBIReferencedData[];\r\n}\r\n\r\nexport type TDBISelectMenuOmitted = Omit<DBISelectMenu, \"type\" | \"description\" | \"dbi\" | \"toJSON\">;\r\n\r\nexport class DBISelectMenu extends DBIBaseInteraction {\r\n constructor(dbi: DBI, args: TDBISelectMenuOmitted) {\r\n super(dbi, {\r\n ...(args as any),\r\n type: \"SelectMenu\",\r\n });\r\n }\r\n\r\n declare options: Omit<Discord.SelectMenuComponentData, \"customId\" | \"type\">;\r\n\r\n override onExecute(ctx: IDBISelectMenuExecuteCtx): Promise<any> | any { };\r\n\r\n toJSON(arg: IDBIToJSONArgs<Omit<Discord.SelectMenuComponentData, \"customId\" | \"type\">> = {} as any): Discord.SelectMenuComponentData {\r\n return {\r\n ...this.options,\r\n ...(arg?.override || {}),\r\n customId: customIdBuilder(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.ttl)\r\n } as any;\r\n };\r\n}"]}
@@ -1,6 +1,6 @@
1
1
  export interface IDBIToJSONArgs<T> {
2
2
  reference?: {
3
- tll?: number;
3
+ ttl?: number;
4
4
  data: (string | number | object)[];
5
5
  };
6
6
  override: T;
@@ -1 +1 @@
1
- {"version":3,"file":"UtilTypes.js","sourceRoot":"","sources":["../../src/utils/UtilTypes.ts"],"names":[],"mappings":"","sourcesContent":["export interface IDBIToJSONArgs<T> {\r\n reference?: {\r\n tll?: number;\r\n data: (string | number | object)[];\r\n };\r\n override: T;\r\n}"]}
1
+ {"version":3,"file":"UtilTypes.js","sourceRoot":"","sources":["../../src/utils/UtilTypes.ts"],"names":[],"mappings":"","sourcesContent":["export interface IDBIToJSONArgs<T> {\r\n reference?: {\r\n ttl?: number;\r\n data: (string | number | object)[];\r\n };\r\n override: T;\r\n}"]}
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "stuffs": "^0.1.17"
10
10
  },
11
11
  "name": "@mostfeatured/dbi",
12
- "version": "0.0.39",
12
+ "version": "0.0.41",
13
13
  "main": "dist/index.js",
14
14
  "type": "commonjs",
15
15
  "private": false,
@@ -22,11 +22,11 @@ export class DBIButton extends DBIBaseInteraction {
22
22
  declare options?: Omit<Discord.ButtonComponentData, "customId" | "type">;
23
23
 
24
24
  override onExecute(ctx: IDBIButtonExecuteCtx): Promise<any> | any { };
25
- toJSON(arg: IDBIToJSONArgs<Discord.ButtonComponentData> = {} as any): Discord.ButtonComponentData {
25
+ toJSON(arg: IDBIToJSONArgs<Omit<Discord.ButtonComponentData, "customId" | "type">> = {} as any): Discord.ButtonComponentData {
26
26
  return {
27
27
  ...this.options,
28
28
  ...(arg?.override || {}),
29
- customId: customIdBuilder(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.tll)
29
+ customId: customIdBuilder(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.ttl)
30
30
  } as any;
31
31
  };
32
32
  }
@@ -33,7 +33,7 @@ export class DBIModal extends DBIBaseInteraction {
33
33
  return {
34
34
  ...this.options,
35
35
  ...(arg?.override || {}),
36
- customId: customIdBuilder(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.tll)
36
+ customId: customIdBuilder(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.ttl)
37
37
  } as any;
38
38
  };
39
39
  }
@@ -23,11 +23,11 @@ export class DBISelectMenu extends DBIBaseInteraction {
23
23
 
24
24
  override onExecute(ctx: IDBISelectMenuExecuteCtx): Promise<any> | any { };
25
25
 
26
- toJSON(arg: IDBIToJSONArgs<Discord.SelectMenuComponentData> = {} as any): Discord.SelectMenuComponentData {
26
+ toJSON(arg: IDBIToJSONArgs<Omit<Discord.SelectMenuComponentData, "customId" | "type">> = {} as any): Discord.SelectMenuComponentData {
27
27
  return {
28
28
  ...this.options,
29
29
  ...(arg?.override || {}),
30
- customId: customIdBuilder(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.tll)
30
+ customId: customIdBuilder(this.dbi, this.name, arg?.reference?.data || [], arg?.reference?.ttl)
31
31
  } as any;
32
32
  };
33
33
  }
@@ -1,6 +1,6 @@
1
1
  export interface IDBIToJSONArgs<T> {
2
2
  reference?: {
3
- tll?: number;
3
+ ttl?: number;
4
4
  data: (string | number | object)[];
5
5
  };
6
6
  override: T;