xernerx 4.17.2 → 4.17.4
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
|
-
|
|
35
|
+
format: string[] | null;
|
|
36
36
|
} | undefined;
|
|
37
37
|
cooldown?: {
|
|
38
38
|
command: number;
|
|
@@ -50,6 +50,7 @@ export default class XernerxClient<T = unknown> extends Client {
|
|
|
50
50
|
readonly cache: XernerxCache;
|
|
51
51
|
readonly cooldowns: Cooldowns;
|
|
52
52
|
readonly dbl: any;
|
|
53
|
+
readonly [index: string]: unknown;
|
|
53
54
|
constructor(discordOptions: ClientOptions, xernerxOptions: XernerxOptions, config?: T);
|
|
54
55
|
connect(token: string): Promise<string>;
|
|
55
56
|
}
|
|
@@ -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
|
-
|
|
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) => {
|
package/dist/functions/deploy.js
CHANGED
|
@@ -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.
|
|
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
|
|
31
|
+
if (!globalCommands.length && !localCommands.length && !client.commands.message.size)
|
|
32
32
|
return;
|
|
33
33
|
try {
|
|
34
34
|
if (client.settings.global) {
|
package/dist/tools/XernerxLog.js
CHANGED
|
@@ -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')
|