xernerx 4.5.23 → 4.5.26
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/README.md +3 -0
- package/dist/build/XernerxContextCommand.d.ts +42 -50
- package/dist/build/XernerxContextCommand.js +71 -71
- package/dist/build/XernerxEvent.d.ts +15 -15
- package/dist/build/XernerxEvent.js +22 -22
- package/dist/build/XernerxInhibitor.d.ts +14 -25
- package/dist/build/XernerxInhibitor.js +20 -20
- package/dist/build/XernerxMessageCommand.d.ts +47 -53
- package/dist/build/XernerxMessageCommand.js +70 -70
- package/dist/build/XernerxSlashCommand.d.ts +57 -71
- package/dist/build/XernerxSlashCommand.js +128 -128
- package/dist/client/XernerxClient.d.ts +40 -48
- package/dist/client/XernerxClient.js +77 -77
- package/dist/client/XernerxShardClient.d.ts +12 -12
- package/dist/client/XernerxShardClient.js +39 -47
- package/dist/functions/deploy.d.ts +1 -1
- package/dist/functions/deploy.js +36 -31
- package/dist/functions/load.d.ts +1 -1
- package/dist/functions/load.js +29 -28
- package/dist/functions/reload.d.ts +1 -1
- package/dist/functions/reload.js +38 -35
- package/dist/functions/sendWebhook.d.ts +1 -1
- package/dist/functions/sendWebhook.js +12 -11
- package/dist/functions/setPresence.d.ts +2 -2
- package/dist/functions/setPresence.js +17 -18
- package/dist/functions/xernerxUser.d.ts +1 -1
- package/dist/functions/xernerxUser.js +6 -6
- package/dist/handlers/CommandHandler.d.ts +9 -9
- package/dist/handlers/CommandHandler.d.ts.map +1 -1
- package/dist/handlers/CommandHandler.js +281 -249
- package/dist/handlers/CommandHandler.js.map +1 -1
- package/dist/handlers/EventHandler.d.ts +3 -3
- package/dist/handlers/EventHandler.js +19 -19
- package/dist/handlers/ExtensionHandler.d.ts +3 -3
- package/dist/handlers/ExtensionHandler.js +20 -18
- package/dist/handlers/Handler.d.ts +8 -8
- package/dist/handlers/Handler.js +42 -32
- package/dist/handlers/InhibitorHandler.d.ts +3 -3
- package/dist/handlers/InhibitorHandler.js +19 -19
- package/dist/handlers/WebhookHandler.d.ts +6 -4
- package/dist/handlers/WebhookHandler.js +44 -47
- package/dist/main.d.ts +22 -29
- package/dist/main.js +22 -29
- package/dist/models/Arguments.d.ts +2 -5
- package/dist/models/Arguments.js +150 -135
- package/dist/tools/XernerxError.d.ts +5 -5
- package/dist/tools/XernerxError.js +9 -9
- package/dist/tools/XernerxLog.d.ts +13 -13
- package/dist/tools/XernerxLog.js +69 -74
- package/dist/tools/XernerxText.d.ts +23 -23
- package/dist/tools/XernerxText.js +85 -76
- package/dist/types/extenders.d.ts +36 -44
- package/dist/types/extenders.js +1 -1
- package/dist/types/interfaces.d.ts +182 -185
- package/dist/types/interfaces.js +1 -1
- package/dist/types/types.d.ts +7 -179
- package/dist/types/types.js +1 -1
- package/dist/utils/ClientUtil.d.ts +9 -11
- package/dist/utils/ClientUtil.js +73 -57
- package/dist/utils/InteractionUtil.d.ts +7 -7
- package/dist/utils/InteractionUtil.js +98 -96
- package/dist/utils/MessageUtil.d.ts +11 -11
- package/dist/utils/MessageUtil.js +135 -130
- package/dist/utils/Util.d.ts +5 -5
- package/dist/utils/Util.js +8 -8
- package/dist/validators/commandValidation.d.ts +2 -5
- package/dist/validators/commandValidation.js +53 -43
- package/dist/validators/inhibitorValidations.d.ts +3 -19
- package/dist/validators/inhibitorValidations.js +31 -31
- package/package.json +16 -13
|
@@ -6,8 +6,5 @@ import { XernerxMessage, XernerxMessageContextInteraction, XernerxSlashInteracti
|
|
|
6
6
|
import { MessageCommandArguments } from '../types/interfaces.js';
|
|
7
7
|
import { XernerxInteraction } from '../types/types.js';
|
|
8
8
|
export declare function messageArguments(message: XernerxMessage, command: MessageCommandBuilder, prefix: string): Promise<MessageCommandArguments>;
|
|
9
|
-
export declare function interactionArguments(
|
|
10
|
-
|
|
11
|
-
command: XernerxContextCommand | XernerxSlashCommand
|
|
12
|
-
): Promise<any>;
|
|
13
|
-
//# sourceMappingURL=Arguments.d.ts.map
|
|
9
|
+
export declare function interactionArguments(interaction: XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction> | any, command: XernerxContextCommand | XernerxSlashCommand): Promise<any>;
|
|
10
|
+
//# sourceMappingURL=Arguments.d.ts.map
|
package/dist/models/Arguments.js
CHANGED
|
@@ -1,140 +1,155 @@
|
|
|
1
1
|
/** @format */
|
|
2
2
|
export async function messageArguments(message, command, prefix) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
3
|
+
const separator = command.separator || ' ', content = message.content
|
|
4
|
+
.replace(new RegExp(`${prefix} +?`), '')
|
|
5
|
+
.split(separator)
|
|
6
|
+
.slice(1);
|
|
7
|
+
let args = {}, flags = {};
|
|
8
|
+
if (command.flags)
|
|
9
|
+
command.flags.map((flag) => {
|
|
10
|
+
if (!flags)
|
|
11
|
+
flags = {};
|
|
12
|
+
if (content.includes(flag.match))
|
|
13
|
+
flags[flag.name] = true;
|
|
14
|
+
else
|
|
15
|
+
flags[flag.name] = false;
|
|
16
|
+
const index = content.indexOf(flag.match);
|
|
17
|
+
if (index > 0)
|
|
18
|
+
content.splice(index, 1);
|
|
19
|
+
});
|
|
20
|
+
if (command.args)
|
|
21
|
+
for (const argument of command.args) {
|
|
22
|
+
const element = content.at(0) || null;
|
|
23
|
+
if (!element) {
|
|
24
|
+
if (typeof argument.default === 'function')
|
|
25
|
+
args[argument.name] = argument.default(message);
|
|
26
|
+
args[argument.name] = argument.default || null;
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
if (argument.type === 'option')
|
|
30
|
+
argument.match?.includes(element) ? (args[argument.name] = element) : (args[argument.name] = null);
|
|
31
|
+
if (argument.type === 'number')
|
|
32
|
+
args[argument.name] = parseInt(element);
|
|
33
|
+
if (argument.type === 'integer')
|
|
34
|
+
args[argument.name] = parseInt(element);
|
|
35
|
+
if (argument.type === 'boolean')
|
|
36
|
+
args[argument.name] = element === 'true' ? true : false;
|
|
37
|
+
if (argument.type === 'confirm')
|
|
38
|
+
args[argument.name] = element === 'yes' ? 'yes' : 'no';
|
|
39
|
+
if (argument.type === 'string')
|
|
40
|
+
args[argument.name] = element;
|
|
41
|
+
if (argument.type === 'channel') {
|
|
42
|
+
try {
|
|
43
|
+
const channel = await message.client.channels.fetch(element);
|
|
44
|
+
args[argument.name] = channel;
|
|
45
|
+
}
|
|
46
|
+
catch (e) {
|
|
47
|
+
args[argument.name] = null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (argument.type === 'guild') {
|
|
51
|
+
try {
|
|
52
|
+
const guild = await message.client.guilds.fetch(element);
|
|
53
|
+
args[argument.name] = guild;
|
|
54
|
+
}
|
|
55
|
+
catch (e) {
|
|
56
|
+
args[argument.name] = null;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (argument.type === 'mentionable') {
|
|
60
|
+
(await Promise.all([message.guild?.roles, message.client.users, message.client.guilds, message.client.channels, message.guild?.members, message.channel.messages].map((req) => req
|
|
61
|
+
? req
|
|
62
|
+
.fetch(element)
|
|
63
|
+
.then((r) => r)
|
|
64
|
+
.catch(() => null)
|
|
65
|
+
: null))).map((mentionable) => {
|
|
66
|
+
if (!args)
|
|
67
|
+
args = {};
|
|
68
|
+
if (mentionable)
|
|
69
|
+
return (args[argument.name] = mentionable);
|
|
70
|
+
else
|
|
71
|
+
return (args[argument.name] = null);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
if (argument.type === 'role') {
|
|
75
|
+
try {
|
|
76
|
+
const role = await message.guild?.roles.fetch(element);
|
|
77
|
+
args[argument.name] = role;
|
|
78
|
+
}
|
|
79
|
+
catch (e) {
|
|
80
|
+
args[argument.name] = null;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (argument.type === 'user') {
|
|
84
|
+
try {
|
|
85
|
+
const user = await message.client.users.fetch(element);
|
|
86
|
+
args[argument.name] = user;
|
|
87
|
+
}
|
|
88
|
+
catch (e) {
|
|
89
|
+
args[argument.name] = null;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (argument.type === 'member') {
|
|
93
|
+
try {
|
|
94
|
+
const member = await message.guild?.members.fetch(element);
|
|
95
|
+
args[argument.name] = member;
|
|
96
|
+
}
|
|
97
|
+
catch (e) {
|
|
98
|
+
args[argument.name] = null;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (argument.type === 'message') {
|
|
102
|
+
try {
|
|
103
|
+
const msg = await message.channel?.messages.fetch(element);
|
|
104
|
+
args[argument.name] = msg;
|
|
105
|
+
}
|
|
106
|
+
catch (e) {
|
|
107
|
+
args[argument.name] = null;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if (argument.type === 'list') {
|
|
111
|
+
let separator = String(argument.separator) || ',';
|
|
112
|
+
if (separator.startsWith('/') && separator.endsWith('/'))
|
|
113
|
+
separator = separator.replace(/^\/|\/$/gim, '');
|
|
114
|
+
const items = content.join(' ').split(new RegExp(' *' + separator + ' *', 'gi'));
|
|
115
|
+
if (!argument.content)
|
|
116
|
+
args[argument.name] = items;
|
|
117
|
+
else {
|
|
118
|
+
const contents = argument.content.map((content) => content.toLowerCase()), itemList = [];
|
|
119
|
+
items.map((item) => (contents.includes(item.toLowerCase()) ? itemList.push(argument.content?.at(contents.indexOf(item.toLowerCase()))) : null));
|
|
120
|
+
args[argument.name] = itemList;
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (argument.type === 'rest') {
|
|
125
|
+
args[argument.name] = content.join(separator);
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
content.splice(0, 1);
|
|
129
|
+
}
|
|
130
|
+
if (!command.flags)
|
|
131
|
+
flags = null;
|
|
132
|
+
if (!command.args)
|
|
133
|
+
args = null;
|
|
134
|
+
return { args, flags };
|
|
120
135
|
}
|
|
121
136
|
export async function interactionArguments(interaction, command) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
if (command.filetype === 'SlashCommand') {
|
|
138
|
+
const options = {};
|
|
139
|
+
let args = interaction?.options?._hoistedOptions, group = interaction?.options?._group, subcommand = interaction?.options?._subcommand;
|
|
140
|
+
if (interaction.options._hoistedOptions) {
|
|
141
|
+
for (const option of interaction.options._hoistedOptions) {
|
|
142
|
+
options[option.name] = option.member || option.channel || option.user || option.role || option.value;
|
|
143
|
+
}
|
|
144
|
+
args = options;
|
|
145
|
+
}
|
|
146
|
+
return { args, group, subcommand };
|
|
147
|
+
}
|
|
148
|
+
if (command.filetype === 'ContextCommand') {
|
|
149
|
+
if (command.type === 'user')
|
|
150
|
+
return await interaction.client.users.fetch(interaction.targetId);
|
|
151
|
+
if (command.type === 'message')
|
|
152
|
+
return await interaction.channel.messages.fetch(interaction.targetId);
|
|
153
|
+
}
|
|
139
154
|
}
|
|
140
|
-
//# sourceMappingURL=Arguments.js.map
|
|
155
|
+
//# sourceMappingURL=Arguments.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @format */
|
|
2
2
|
export default class XernerxError {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
name: string;
|
|
4
|
+
message: string | null;
|
|
5
|
+
stack: {} | undefined;
|
|
6
|
+
constructor(message?: string, error?: Error | unknown);
|
|
7
7
|
}
|
|
8
|
-
//# sourceMappingURL=XernerxError.d.ts.map
|
|
8
|
+
//# sourceMappingURL=XernerxError.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/** @format */
|
|
2
2
|
export default class XernerxError {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
name;
|
|
4
|
+
message;
|
|
5
|
+
stack;
|
|
6
|
+
constructor(message, error) {
|
|
7
|
+
this.name = 'XernerxError';
|
|
8
|
+
this.message = message || null;
|
|
9
|
+
this.stack = error || new Error().stack;
|
|
10
|
+
}
|
|
11
11
|
}
|
|
12
|
-
//# sourceMappingURL=XernerxError.js.map
|
|
12
|
+
//# sourceMappingURL=XernerxError.js.map
|
|
@@ -3,17 +3,17 @@ import XernerxError from './XernerxError.js';
|
|
|
3
3
|
import XernerxClient from '../client/XernerxClient.js';
|
|
4
4
|
import { XernerxClientType } from '../main.js';
|
|
5
5
|
export default class XernerxLog {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
private readonly client;
|
|
7
|
+
private readonly errorLog;
|
|
8
|
+
private readonly infoLog;
|
|
9
|
+
private readonly readyLog;
|
|
10
|
+
private readonly tableLog;
|
|
11
|
+
private readonly time;
|
|
12
|
+
constructor(client: XernerxClient | XernerxClientType | true);
|
|
13
|
+
info(message: string, force?: boolean): void | null;
|
|
14
|
+
warn(message: string): void | null;
|
|
15
|
+
update(version: string, url: string): Promise<void>;
|
|
16
|
+
error(message: string, error?: XernerxError | unknown): void | null;
|
|
17
|
+
ready(): void;
|
|
18
18
|
}
|
|
19
|
-
//# sourceMappingURL=XernerxLog.d.ts.map
|
|
19
|
+
//# sourceMappingURL=XernerxLog.d.ts.map
|
package/dist/tools/XernerxLog.js
CHANGED
|
@@ -1,78 +1,73 @@
|
|
|
1
1
|
/** @format */
|
|
2
2
|
import { Style } from 'dumfunctions';
|
|
3
3
|
export default class XernerxLog {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (this.tableLog) {
|
|
73
|
-
console.table(files, this.tableLog);
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
}
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
if (client == true) {
|
|
7
|
+
this.errorLog = true;
|
|
8
|
+
this.infoLog = true;
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
this.errorLog = client.settings.log?.error;
|
|
12
|
+
this.infoLog = client.settings.log?.info;
|
|
13
|
+
this.readyLog = client.settings.log?.ready;
|
|
14
|
+
this.tableLog = client.settings.log?.table;
|
|
15
|
+
}
|
|
16
|
+
this.time = () => String(new Date()).split(/ +/)[4];
|
|
17
|
+
}
|
|
18
|
+
info(message, force = false) {
|
|
19
|
+
return this.infoLog || force ? console.info(`✔️ | ${Style.log('Xernerx', { color: Style.TextColor.Purple })} | ${Style.log(this.time(), { color: Style.TextColor.Cyan })} | ${message}`) : null;
|
|
20
|
+
}
|
|
21
|
+
warn(message) {
|
|
22
|
+
return this.infoLog ? console.warn(`⚠️ | ${Style.log('Xernerx', { color: Style.TextColor.Yellow })} | ${Style.log(this.time(), { color: Style.TextColor.Cyan })} | ${message}`) : null;
|
|
23
|
+
}
|
|
24
|
+
async update(version, url) {
|
|
25
|
+
const pkg = await fetch(url)
|
|
26
|
+
.then(async (res) => await res.json())
|
|
27
|
+
.catch(() => ({ version }));
|
|
28
|
+
if (version !== pkg.version)
|
|
29
|
+
new XernerxLog(true).warn(`A new version for ${pkg.name} is available, you're using version ${Style.log(version, { color: Style.TextColor.Cyan })}, new version is ${Style.log(pkg.version, {
|
|
30
|
+
color: Style.TextColor.Cyan,
|
|
31
|
+
})}, run ${Style.log(`npm i ${pkg.name}@${pkg.version}`, { color: Style.BackgroundColor.Grey })} to update to the latest version.`);
|
|
32
|
+
}
|
|
33
|
+
error(message, error) {
|
|
34
|
+
return this.errorLog
|
|
35
|
+
? console.error(`❗ | ${Style.log('Xernerx', { color: Style.TextColor.Red })} | ${Style.log(this.time(), { color: Style.TextColor.Cyan })} | ${message}${error ? ` | ${error.stack}` : ''}`)
|
|
36
|
+
: null;
|
|
37
|
+
}
|
|
38
|
+
ready() {
|
|
39
|
+
if (typeof this.client == 'boolean')
|
|
40
|
+
return;
|
|
41
|
+
const client = this.client;
|
|
42
|
+
this.client.prependOnceListener('ready', async (synced) => {
|
|
43
|
+
this.info(`${Style.log(synced.user.tag, { color: Style.TextColor.Blue })} is now ${Style.log('online', { color: Style.TextColor.Green })}, watching ${Style.log(String(client.guilds.cache.size), {
|
|
44
|
+
color: Style.TextColor.Cyan,
|
|
45
|
+
})} guild${client.guilds.cache.size > 1 ? 's' : ''}, using ${client.settings.local ? Style.log((await client.guilds.fetch(client.settings.local)).name, { color: Style.TextColor.Blue }) : 'none'} as local guild.`, this.readyLog);
|
|
46
|
+
const files = [];
|
|
47
|
+
for (const [id, data] of client.commands.message) {
|
|
48
|
+
files.push(data);
|
|
49
|
+
id;
|
|
50
|
+
}
|
|
51
|
+
for (const [id, data] of client.commands.slash) {
|
|
52
|
+
files.push(data);
|
|
53
|
+
id;
|
|
54
|
+
}
|
|
55
|
+
for (const [id, data] of client.commands.context) {
|
|
56
|
+
files.push(data);
|
|
57
|
+
id;
|
|
58
|
+
}
|
|
59
|
+
for (const [id, data] of client.events) {
|
|
60
|
+
files.push(data);
|
|
61
|
+
id;
|
|
62
|
+
}
|
|
63
|
+
for (const [id, data] of client.inhibitors) {
|
|
64
|
+
files.push(data);
|
|
65
|
+
id;
|
|
66
|
+
}
|
|
67
|
+
if (this.tableLog) {
|
|
68
|
+
console.table(files, this.tableLog);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
77
72
|
}
|
|
78
|
-
//# sourceMappingURL=XernerxLog.js.map
|
|
73
|
+
//# sourceMappingURL=XernerxLog.js.map
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/** @format */
|
|
2
2
|
import { Emoji, Role, XernerxGuildChannel, XernerxMember, XernerxUser } from '../main.js';
|
|
3
3
|
export default class XernerxText {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
user(user: string | XernerxUser): string;
|
|
5
|
+
channel(channel: string | XernerxGuildChannel): string;
|
|
6
|
+
role(role: string | Role): string;
|
|
7
|
+
emoji(emoji: string | Emoji, animated?: boolean): string;
|
|
8
|
+
member(member: string | XernerxMember): string;
|
|
9
|
+
timestamp(timestamp?: number | Date, format?: 't' | 'T' | 'd' | 'D' | 'f' | 'F' | 'R'): string;
|
|
10
|
+
codeBlock(code: string, language: string): string;
|
|
11
|
+
iCodeBlock(code: string): string;
|
|
12
|
+
bold(text: string): string;
|
|
13
|
+
italic(text: string): string;
|
|
14
|
+
underline(text: string): string;
|
|
15
|
+
strike(text: string): string;
|
|
16
|
+
spoiler(text: string): string;
|
|
17
|
+
quote(text: string): string;
|
|
18
|
+
blockQuote(text: string): string;
|
|
19
|
+
hyperlink(text: string, url: string): string;
|
|
20
|
+
Progressbar(min: number, max: number, cur: number, options?: ProgressBarOptions): string;
|
|
21
21
|
}
|
|
22
22
|
interface ProgressBarOptions {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
fill?: string;
|
|
24
|
+
fade?: string;
|
|
25
|
+
empty?: string;
|
|
26
|
+
percentage?: boolean;
|
|
27
|
+
length?: number;
|
|
28
28
|
}
|
|
29
29
|
export {};
|
|
30
|
-
//# sourceMappingURL=XernerxText.d.ts.map
|
|
30
|
+
//# sourceMappingURL=XernerxText.d.ts.map
|