@open-discord-bots/framework 0.5.0 → 0.5.2

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.5.0"));
47
+ this.versions.add(ODVersion.fromString("opendiscord:api", "v0.5.2"));
48
48
  this.versions.add(ODVersion.fromString("opendiscord:livestatus", "v2.0.0"));
49
49
  this.debugfile = managers.debugfile;
50
50
  this.console = managers.console;
@@ -478,7 +478,7 @@ export declare class ODModalResponderInstanceValues {
478
478
  /**Get the selected values of a mentionable dropdown. */
479
479
  getMentionableDropdownValues(name: string): Promise<(discord.User | discord.Role)[]>;
480
480
  /**Get the uploaded files of a modal file upload component. */
481
- getUploadedFiles(name: string): Promise<discord.Attachment[]>;
481
+ getUploadedFiles(name: string): discord.Attachment[];
482
482
  }
483
483
  /**## ODModalResponderInstance `class`
484
484
  * This is an Open Discord modal responder instance.
@@ -1119,7 +1119,7 @@ export class ODModalResponderInstanceValues {
1119
1119
  const data = this.interaction.fields.getTextInputValue(name);
1120
1120
  if (data.length < 1 && required)
1121
1121
  throw new ODSystemError("ODModalResponderInstanceValues:getTextField() field required, found empty!");
1122
- return (data.length < 1) ? data : null;
1122
+ return (data.length > 0) ? data : null;
1123
1123
  }
1124
1124
  catch (err) {
1125
1125
  process.emit("uncaughtException", err);
@@ -1249,7 +1249,7 @@ export class ODModalResponderInstanceValues {
1249
1249
  }
1250
1250
  }
1251
1251
  /**Get the uploaded files of a modal file upload component. */
1252
- async getUploadedFiles(name) {
1252
+ getUploadedFiles(name) {
1253
1253
  try {
1254
1254
  const result = (this.interaction.fields.getUploadedFiles(name)?.toJSON() ?? []);
1255
1255
  return result;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@open-discord-bots/framework",
3
3
  "author": "DJj123dj",
4
- "version": "0.5.0",
4
+ "version": "0.5.2",
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",