xernerx 4.17.2 → 4.17.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.
@@ -32,7 +32,7 @@ export default class XernerxClient<T = unknown> extends Client {
32
32
  ready: boolean;
33
33
  info: boolean;
34
34
  table: string[] | null;
35
- config: string[] | null;
35
+ format: string[] | null;
36
36
  } | undefined;
37
37
  cooldown?: {
38
38
  command: number;
@@ -44,7 +44,7 @@ export default class XernerxClient extends Client {
44
44
  warn: z.boolean().default(false),
45
45
  error: z.boolean().default(false),
46
46
  table: z.array(z.string()).or(z.null()).default(null),
47
- config: z.array(z.string()).or(z.null()).default(null),
47
+ format: z.array(z.string()).or(z.null()).default(null),
48
48
  })
49
49
  .or(z.boolean())
50
50
  .optional(),
@@ -89,7 +89,7 @@ export default class XernerxClient extends Client {
89
89
  };
90
90
  }
91
91
  async connect(token) {
92
- const login = this.login(token);
92
+ const login = this.login(token); // TODO add thing to catch and have better error message
93
93
  deploy(this);
94
94
  if (this.settings.ceaseless) {
95
95
  process.on('unhandledRejection', (error) => {
@@ -23,12 +23,12 @@ export default function deploy(client) {
23
23
  stats();
24
24
  client.commands.slash.map((command) => commands.push(command));
25
25
  client.commands.context.map((command) => commands.push(command));
26
- client.commands.slash.map((command) => commands.push(command));
26
+ client.commands.message.map((command) => commands.push(command));
27
27
  if (client.commands.slash.size)
28
28
  client.commands.slash.map((command) => (command.global ? globalCommands.push(command.data.toJSON()) : localCommands.push(command.data.toJSON())));
29
29
  if (client.commands.context.size)
30
30
  client.commands.context.map((command) => (command.global ? globalCommands.push(command.data.toJSON()) : localCommands.push(command.data.toJSON())));
31
- if (globalCommands.length <= 0 && localCommands.length <= 0)
31
+ if (!globalCommands.length && !localCommands.length && !client.commands.message.size)
32
32
  return;
33
33
  try {
34
34
  if (client.settings.global) {
@@ -64,7 +64,7 @@ export default class XernerxLog {
64
64
  })} to update to the latest version.`));
65
65
  }
66
66
  error(message, error) {
67
- return this.errorLog ? console.error(this.base('error', message), error) : null;
67
+ return this.errorLog ? console.error(this.base('error', message), error || '') : null;
68
68
  }
69
69
  ready() {
70
70
  if (typeof this.client == 'boolean')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xernerx",
3
- "version": "4.17.2",
3
+ "version": "4.17.3",
4
4
  "description": "A bot framework for discord.js.",
5
5
  "main": "dist/main.js",
6
6
  "type": "module",