@open-discord-bots/framework 0.4.7 → 0.4.8

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/api/main.js CHANGED
@@ -44,7 +44,7 @@ export class ODMain {
44
44
  constructor(managers, project) {
45
45
  this.project = project;
46
46
  this.versions = managers.versions;
47
- this.versions.add(ODVersion.fromString("opendiscord:api", "v0.4.7"));
47
+ this.versions.add(ODVersion.fromString("opendiscord:api", "v0.4.8"));
48
48
  this.versions.add(ODVersion.fromString("opendiscord:livestatus", "v2.0.0"));
49
49
  this.debugfile = managers.debugfile;
50
50
  this.console = managers.console;
@@ -2,7 +2,7 @@ import { ODId, ODValidId, ODManagerData, ODNoGeneric, ODManager, ODValidButtonCo
2
2
  import * as discord from "discord.js";
3
3
  import { ODWorkerManager, ODWorkerCallback } from "./worker.js";
4
4
  import { ODDebugger } from "./console.js";
5
- import { ODMessage, ODMessageInstance } from "./builder.js";
5
+ import { ODMessage, ODMessageInstance, ODModalBuildResult } from "./builder.js";
6
6
  /**## ODComponentFactoryInstance `class`
7
7
  * An Open Discord component factory instance.
8
8
  *
@@ -395,9 +395,12 @@ export type ODValidModalComponents = ODLabelComponent | ODTextComponent;
395
395
  * A modal builder with **components v2** support.
396
396
  * Add questions, select menu's & labels to this modal using `addComponent()`.
397
397
  */
398
- export declare class ODModalComponent extends ODGroupComponent<ODModalComponentData, ODValidModalComponents, discord.ModalBuilder> {
398
+ export declare class ODModalComponent extends ODGroupComponent<ODModalComponentData, ODValidModalComponents, ODModalBuildResult> {
399
399
  constructor(id: ODValidId, data?: Partial<ODModalComponentData>);
400
- build(): Promise<discord.ModalBuilder>;
400
+ build(): Promise<{
401
+ id: ODId;
402
+ modal: discord.ModalBuilder;
403
+ }>;
401
404
  /**Set the title of the modal. */
402
405
  setTitle(title: string): this;
403
406
  /**Set the custom id of this modal. */
@@ -538,11 +538,14 @@ export class ODModalComponent extends ODGroupComponent {
538
538
  components.push(res.toJSON());
539
539
  }
540
540
  }
541
- return new discord.ModalBuilder({
542
- components,
543
- title: this.data.title,
544
- customId: this.data.customId
545
- });
541
+ return {
542
+ id: new ODId(this.id),
543
+ modal: new discord.ModalBuilder({
544
+ components,
545
+ title: this.data.title,
546
+ customId: this.data.customId
547
+ })
548
+ };
546
549
  }
547
550
  /**Set the title of the modal. */
548
551
  setTitle(title) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@open-discord-bots/framework",
3
3
  "author": "DJj123dj",
4
- "version": "0.4.7",
4
+ "version": "0.4.8",
5
5
  "description": "The core framework of the popular open-source discord bots: Open Ticket & Open Moderation.",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",