xernerx 3.4.2 → 3.4.3

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.
@@ -72,8 +72,6 @@ export default class ContextCommandBuilder {
72
72
  this.clientPermissions = options.clientPermissions;
73
73
  this.defer = options.defer;
74
74
  this.client = XernerxClient;
75
- this.conditions = this.conditions;
76
- this.exec = this.exec;
77
75
  }
78
76
  /**
79
77
  * @param {Interaction} interaction - The Discord interaction event data.
@@ -19,7 +19,6 @@ export default class InhibitorBuilder {
19
19
  this.name = options.name;
20
20
  this.type = options.type;
21
21
  this.client = XernerxClient;
22
- this.check = this.check;
23
22
  }
24
23
  /**
25
24
  *
@@ -62,8 +62,6 @@ export default class MessageCommandBuilder {
62
62
  this.clientPermissions = options.clientPermissions || [];
63
63
  this.args = options.args || [];
64
64
  this.client = XernerxClient;
65
- this.conditions = this.conditions;
66
- this.exec = this.exec;
67
65
  }
68
66
  /**
69
67
  * @param {Message} message - The Discord message event data.
@@ -6,6 +6,8 @@ import CommandHandler from '../handlers/CommandHandler.js';
6
6
  import EventHandler from '../handlers/EventHandler.js';
7
7
  import InhibitorHandler from '../handlers/InhibitorHandler.js';
8
8
  import Extensions from '../models/Extensions.js';
9
+ // TODO - Add logOnError as a setting to the client.
10
+ // TODO - Add commandNotFound as an event to the client.
9
11
  /**
10
12
  * @description - The Client.
11
13
  * @param {DiscordOptions} discordOptions - The options for discord.js.
@@ -1,12 +1,13 @@
1
1
  import XernerxClient from '../client/XernerxClient.js';
2
+ import { Handler } from './Handler.js';
2
3
  import { ContextCommandHandlerOptions, MessageCommandHandlerOptions, SlashCommandHandlerOptions } from '../types/options.js';
3
4
  /**
4
5
  * @description - The command handler.
5
6
  * @param {XernerxClient} client - The XernerxClient.
6
7
  */
7
8
  export default class CommandHandler {
8
- private client;
9
- private handler;
9
+ client: XernerxClient;
10
+ handler: Handler;
10
11
  constructor(client: XernerxClient);
11
12
  /**
12
13
  * @description - The message command loader.
@@ -1,8 +1,9 @@
1
1
  import XernerxClient from '../client/XernerxClient.js';
2
2
  import { EventHandlerOptions } from '../types/options.js';
3
+ import { Handler } from './Handler.js';
3
4
  export default class EventHandler {
4
- private client;
5
- private handler;
5
+ client: XernerxClient;
6
+ handler: Handler;
6
7
  constructor(client: XernerxClient);
7
8
  /**
8
9
  * @description - The event loader
@@ -6,8 +6,8 @@ import { ContextCommandHandlerOptions, EventHandlerOptions, InhibitorHandlerOpti
6
6
  */
7
7
  export declare class Handler {
8
8
  private client;
9
- private commands;
10
- private readyTimestamp;
9
+ commands: object[];
10
+ readyTimestamp: number;
11
11
  constructor(client: XernerxClient);
12
12
  /**
13
13
  * @description - The loader for the message commands.
@@ -1,4 +1,4 @@
1
- import fs from 'node:fs';
1
+ import fs from 'fs';
2
2
  import * as path from 'path';
3
3
  import { CommandType } from '../types/enums.js';
4
4
  import { s } from '@sapphire/shapeshift';
@@ -1,12 +1,13 @@
1
1
  import XernerxClient from '../client/XernerxClient.js';
2
2
  import { InhibitorHandlerOptions } from '../types/options.js';
3
+ import { Handler } from './Handler.js';
3
4
  /**
4
5
  * @description - Inhibitor loader.
5
6
  * @param {XernerxClient} client - The XernerxClient.
6
7
  */
7
8
  export default class InhibitorHandler {
8
- private client;
9
- private handler;
9
+ client: XernerxClient;
10
+ handler: Handler;
10
11
  constructor(client: XernerxClient);
11
12
  /**
12
13
  * @description - The loader for all inhibitors.
@@ -1,7 +1,7 @@
1
1
  import MessageCommandBuilder from '../build/MessageCommandBuilder.js';
2
2
  import { XernerxInteraction, XernerxMessage } from '../types/types.js';
3
3
  export declare class InteractionArguments {
4
- private interaction;
4
+ interaction: XernerxInteraction;
5
5
  constructor(interaction: XernerxInteraction);
6
6
  group(): string | undefined;
7
7
  subcommand(): string | undefined;
@@ -1,18 +1,18 @@
1
1
  import XernerxClient from '../client/XernerxClient.js';
2
2
  export declare class MessageCommandEvents {
3
- private client;
3
+ client: XernerxClient;
4
4
  constructor(client: XernerxClient);
5
5
  messageCreate(): void;
6
6
  messageUpdate(): void;
7
7
  messageDelete(): void;
8
8
  }
9
9
  export declare class SlashCommandEvents {
10
- private client;
10
+ client: XernerxClient;
11
11
  constructor(client: XernerxClient);
12
12
  slashCreate(): void;
13
13
  }
14
14
  export declare class ContextCommandEvents {
15
- private client;
15
+ client: XernerxClient;
16
16
  constructor(client: XernerxClient);
17
17
  contextCreate(): void;
18
18
  }
@@ -1,7 +1,7 @@
1
1
  import XernerxExtensionBuilder from 'xernerx-extension-builder';
2
2
  import XernerxClient from '../client/XernerxClient.js';
3
3
  export default class Extensions {
4
- private client;
4
+ client: XernerxClient;
5
5
  constructor(client: XernerxClient);
6
6
  load(extensions: Array<XernerxExtensionBuilder>, logging?: boolean): Promise<void>;
7
7
  }
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "xernerx",
3
- "version": "3.4.2",
3
+ "version": "3.4.3",
4
4
  "type": "module",
5
5
  "description": "A bot framework for discord.js.",
6
6
  "main": "dist/main.js",
@@ -8,7 +8,7 @@ interface Presence {
8
8
  interval?: number;
9
9
  }
10
10
  export declare class ClientUtil {
11
- private client;
11
+ client: XernerxClient;
12
12
  constructor(client: XernerxClient);
13
13
  uptime(timestamp: number | null): string;
14
14
  getSubcommands(name: string): object[];
@@ -25,8 +25,8 @@ interface ButtonOptions {
25
25
  ephemeral?: boolean;
26
26
  }
27
27
  export declare class MessageCommandUtil {
28
- private client;
29
- private message;
28
+ client: XernerxClient;
29
+ message: XernerxMessage;
30
30
  constructor(client: XernerxClient, message: Message & XernerxMessage);
31
31
  reply(content: MessagePayload | string): Promise<Message<boolean> | undefined>;
32
32
  send(content: MessagePayload | string): Promise<Message<true> | Message<false> | undefined>;
@@ -40,8 +40,8 @@ export declare class MessageCommandUtil {
40
40
  createModal(): void;
41
41
  }
42
42
  export declare class InteractionCommandUtil {
43
- private client;
44
- private interaction;
43
+ client: XernerxClient;
44
+ interaction: any;
45
45
  constructor(client: XernerxClient, interaction: Interaction);
46
46
  reply(content: MessagePayload | string): any;
47
47
  defer(time: number): Promise<unknown>;
@@ -1,10 +1,10 @@
1
1
  import XernerxClient from '../client/XernerxClient.js';
2
2
  import { XernerxInteraction, XernerxMessage } from '../types/types.js';
3
3
  export declare class InhibitorValidation {
4
- private client;
5
- private action;
6
- private command;
7
- private inhibited;
4
+ client: XernerxClient;
5
+ action: XernerxMessage | XernerxInteraction;
6
+ command: string;
7
+ inhibited: Record<string, string | void>;
8
8
  constructor(client: XernerxClient, action: XernerxMessage | XernerxInteraction, command: string);
9
9
  inhibit(): Promise<Record<string, string | void> | undefined>;
10
10
  private args;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xernerx",
3
- "version": "3.4.2",
3
+ "version": "3.4.3",
4
4
  "type": "module",
5
5
  "description": "A bot framework for discord.js.",
6
6
  "main": "dist/main.js",