xernerx 4.5.6 → 4.5.7
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/build/XernerxContextCommand.d.ts +46 -44
- package/dist/build/XernerxContextCommand.js +64 -62
- package/dist/build/XernerxEvent.d.ts +16 -14
- package/dist/build/XernerxEvent.js +21 -19
- package/dist/build/XernerxInhibitor.d.ts +19 -17
- package/dist/build/XernerxInhibitor.js +13 -11
- package/dist/build/XernerxMessageCommand.d.ts +44 -42
- package/dist/build/XernerxMessageCommand.js +58 -56
- package/dist/build/XernerxSlashCommand.d.ts +56 -54
- package/dist/build/XernerxSlashCommand.js +110 -108
- package/dist/client/XernerxClient.d.ts +46 -44
- package/dist/client/XernerxClient.js +75 -73
- package/dist/client/XernerxShardClient.d.ts +12 -10
- package/dist/client/XernerxShardClient.js +50 -48
- package/dist/functions/deploy.d.ts +2 -0
- package/dist/functions/deploy.js +32 -30
- package/dist/functions/load.d.ts +2 -0
- package/dist/functions/load.js +29 -27
- package/dist/functions/reload.d.ts +2 -0
- package/dist/functions/reload.js +36 -34
- package/dist/functions/sendWebhook.d.ts +2 -0
- package/dist/functions/sendWebhook.js +12 -10
- package/dist/functions/setPresence.d.ts +2 -0
- package/dist/functions/setPresence.js +19 -17
- package/dist/functions/xernerxUser.d.ts +2 -0
- package/dist/functions/xernerxUser.js +10 -8
- package/dist/handlers/CommandHandler.d.ts +10 -8
- package/dist/handlers/CommandHandler.js +241 -239
- package/dist/handlers/EventHandler.d.ts +4 -2
- package/dist/handlers/EventHandler.js +20 -18
- package/dist/handlers/ExtensionHandler.d.ts +4 -2
- package/dist/handlers/ExtensionHandler.js +19 -17
- package/dist/handlers/Handler.d.ts +9 -7
- package/dist/handlers/Handler.js +33 -31
- package/dist/handlers/InhibitorHandler.d.ts +4 -2
- package/dist/handlers/InhibitorHandler.js +20 -18
- package/dist/handlers/WebhookHandler.d.ts +5 -3
- package/dist/handlers/WebhookHandler.js +48 -46
- package/dist/main.d.ts +28 -26
- package/dist/main.js +28 -26
- package/dist/models/Arguments.d.ts +4 -2
- package/dist/models/Arguments.js +136 -134
- package/dist/tools/XernerxError.d.ts +6 -4
- package/dist/tools/XernerxError.js +10 -8
- package/dist/tools/XernerxLog.d.ts +14 -12
- package/dist/tools/XernerxLog.js +77 -80
- package/dist/types/extenders.d.ts +13 -11
- package/dist/types/extenders.js +2 -0
- package/dist/types/interfaces.d.ts +184 -172
- package/dist/types/interfaces.d.ts.map +1 -1
- package/dist/types/interfaces.js +2 -0
- package/dist/types/interfaces.js.map +1 -1
- package/dist/types/types.d.ts +173 -171
- package/dist/types/types.js +2 -0
- package/dist/utils/ClientUtil.d.ts +8 -5
- package/dist/utils/ClientUtil.d.ts.map +1 -1
- package/dist/utils/ClientUtil.js +45 -26
- package/dist/utils/ClientUtil.js.map +1 -1
- package/dist/utils/InteractionUtil.d.ts +11 -5
- package/dist/utils/InteractionUtil.d.ts.map +1 -1
- package/dist/utils/InteractionUtil.js +98 -8
- package/dist/utils/InteractionUtil.js.map +1 -1
- package/dist/utils/MessageUtil.d.ts +14 -9
- package/dist/utils/MessageUtil.d.ts.map +1 -1
- package/dist/utils/MessageUtil.js +131 -37
- package/dist/utils/MessageUtil.js.map +1 -1
- package/dist/utils/Util.d.ts +5 -3
- package/dist/utils/Util.js +9 -7
- package/dist/validators/commandValidation.d.ts +4 -2
- package/dist/validators/commandValidation.js +44 -42
- package/dist/validators/inhibitorValidations.d.ts +16 -14
- package/dist/validators/inhibitorValidations.js +32 -30
- package/package.json +1 -1
package/dist/models/Arguments.js
CHANGED
|
@@ -1,139 +1,141 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
1
3
|
export async function messageArguments(message, command, prefix) {
|
|
2
|
-
|
|
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
|
-
|
|
4
|
+
const separator = command.separator || ' ',
|
|
5
|
+
content = message.content
|
|
6
|
+
.replace(new RegExp(`${prefix} +?`), '')
|
|
7
|
+
.split(separator)
|
|
8
|
+
.slice(1);
|
|
9
|
+
let args = {},
|
|
10
|
+
flags = {};
|
|
11
|
+
if (command.flags)
|
|
12
|
+
command.flags.map((flag) => {
|
|
13
|
+
if (!flags) flags = {};
|
|
14
|
+
if (content.includes(flag.match)) flags[flag.name] = true;
|
|
15
|
+
else flags[flag.name] = false;
|
|
16
|
+
const index = content.indexOf(flag.match);
|
|
17
|
+
if (index > 0) content.splice(index, 1);
|
|
18
|
+
});
|
|
19
|
+
if (command.args)
|
|
20
|
+
for (const argument of command.args) {
|
|
21
|
+
const element = content.at(0) || null;
|
|
22
|
+
if (!element) {
|
|
23
|
+
if (typeof argument.default === 'function') args[argument.name] = argument.default(message);
|
|
24
|
+
args[argument.name] = argument.default || null;
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
if (argument.type === 'option') argument.match?.includes(element) ? (args[argument.name] = element) : (args[argument.name] = null);
|
|
28
|
+
if (argument.type === 'number') args[argument.name] = parseInt(element);
|
|
29
|
+
if (argument.type === 'integer') args[argument.name] = parseInt(element);
|
|
30
|
+
if (argument.type === 'boolean') args[argument.name] = element === 'true' ? true : false;
|
|
31
|
+
if (argument.type === 'confirm') args[argument.name] = element === 'yes' ? 'yes' : 'no';
|
|
32
|
+
if (argument.type === 'string') args[argument.name] = element;
|
|
33
|
+
if (argument.type === 'channel') {
|
|
34
|
+
try {
|
|
35
|
+
const channel = await message.client.channels.fetch(element);
|
|
36
|
+
args[argument.name] = channel;
|
|
37
|
+
} catch (e) {
|
|
38
|
+
args[argument.name] = null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (argument.type === 'guild') {
|
|
42
|
+
try {
|
|
43
|
+
const guild = await message.client.guilds.fetch(element);
|
|
44
|
+
args[argument.name] = guild;
|
|
45
|
+
} catch (e) {
|
|
46
|
+
args[argument.name] = null;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (argument.type === 'mentionable') {
|
|
50
|
+
(
|
|
51
|
+
await Promise.all(
|
|
52
|
+
[message.guild?.roles, message.client.users, message.client.guilds, message.client.channels, message.guild?.members, message.channel.messages].map((req) =>
|
|
53
|
+
req
|
|
54
|
+
? req
|
|
55
|
+
.fetch(element)
|
|
56
|
+
.then((r) => r)
|
|
57
|
+
.catch(() => null)
|
|
58
|
+
: null
|
|
59
|
+
)
|
|
60
|
+
)
|
|
61
|
+
).map((mentionable) => {
|
|
62
|
+
if (!args) args = {};
|
|
63
|
+
if (mentionable) return (args[argument.name] = mentionable);
|
|
64
|
+
else return (args[argument.name] = null);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
if (argument.type === 'role') {
|
|
68
|
+
try {
|
|
69
|
+
const role = await message.guild?.roles.fetch(element);
|
|
70
|
+
args[argument.name] = role;
|
|
71
|
+
} catch (e) {
|
|
72
|
+
args[argument.name] = null;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (argument.type === 'user') {
|
|
76
|
+
try {
|
|
77
|
+
const user = await message.client.users.fetch(element);
|
|
78
|
+
args[argument.name] = user;
|
|
79
|
+
} catch (e) {
|
|
80
|
+
args[argument.name] = null;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (argument.type === 'member') {
|
|
84
|
+
try {
|
|
85
|
+
const member = await message.guild?.members.fetch(element);
|
|
86
|
+
args[argument.name] = member;
|
|
87
|
+
} catch (e) {
|
|
88
|
+
args[argument.name] = null;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (argument.type === 'message') {
|
|
92
|
+
try {
|
|
93
|
+
const msg = await message.channel?.messages.fetch(element);
|
|
94
|
+
args[argument.name] = msg;
|
|
95
|
+
} catch (e) {
|
|
96
|
+
args[argument.name] = null;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (argument.type === 'list') {
|
|
100
|
+
let separator = String(argument.separator) || ',';
|
|
101
|
+
if (separator.startsWith('/') && separator.endsWith('/')) separator = separator.replace(/^\/|\/$/gim, '');
|
|
102
|
+
const items = content.join(' ').split(new RegExp(' *' + separator + ' *', 'gi'));
|
|
103
|
+
if (!argument.content) args[argument.name] = items;
|
|
104
|
+
else {
|
|
105
|
+
const contents = argument.content.map((content) => content.toLowerCase()),
|
|
106
|
+
itemList = [];
|
|
107
|
+
items.map((item) => (contents.includes(item.toLowerCase()) ? itemList.push(argument.content?.at(contents.indexOf(item.toLowerCase()))) : null));
|
|
108
|
+
args[argument.name] = itemList;
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (argument.type === 'rest') {
|
|
113
|
+
args[argument.name] = content.join(separator);
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
content.splice(0, 1);
|
|
117
|
+
}
|
|
118
|
+
if (!command.flags) flags = null;
|
|
119
|
+
if (!command.args) args = null;
|
|
120
|
+
return { args, flags };
|
|
119
121
|
}
|
|
120
122
|
export async function interactionArguments(interaction, command) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
123
|
+
if (command.fileType === 'SlashCommand') {
|
|
124
|
+
const options = {};
|
|
125
|
+
let args = interaction?.options?._hoistedOptions,
|
|
126
|
+
group = interaction?.options?._group,
|
|
127
|
+
subcommand = interaction?.options?._subcommand;
|
|
128
|
+
if (interaction.options._hoistedOptions) {
|
|
129
|
+
for (const option of interaction.options._hoistedOptions) {
|
|
130
|
+
options[option.name] = option.member || option.channel || option.user || option.role || option.value;
|
|
131
|
+
}
|
|
132
|
+
args = options;
|
|
133
|
+
}
|
|
134
|
+
return { args, group, subcommand };
|
|
135
|
+
}
|
|
136
|
+
if (command.fileType === 'ContextCommand') {
|
|
137
|
+
if (command.type === 'user') return await interaction.client.users.fetch(interaction.targetId);
|
|
138
|
+
if (command.type === 'message') return await interaction.channel.messages.fetch(interaction.targetId);
|
|
139
|
+
}
|
|
138
140
|
}
|
|
139
141
|
//# sourceMappingURL=Arguments.js.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
1
3
|
export default class XernerxError {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
name: string;
|
|
5
|
+
message: string | null;
|
|
6
|
+
stack: {} | undefined;
|
|
7
|
+
constructor(message?: string, error?: Error | unknown);
|
|
6
8
|
}
|
|
7
9
|
//# sourceMappingURL=XernerxError.d.ts.map
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
1
3
|
export default class XernerxError {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
name;
|
|
5
|
+
message;
|
|
6
|
+
stack;
|
|
7
|
+
constructor(message, error) {
|
|
8
|
+
this.name = 'XernerxError';
|
|
9
|
+
this.message = message || null;
|
|
10
|
+
this.stack = error || new Error().stack;
|
|
11
|
+
}
|
|
10
12
|
}
|
|
11
13
|
//# sourceMappingURL=XernerxError.js.map
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
1
3
|
import XernerxError from './XernerxError.js';
|
|
2
4
|
import XernerxClient from '../client/XernerxClient.js';
|
|
3
5
|
export default class XernerxLog {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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 | 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;
|
|
16
18
|
}
|
|
17
19
|
//# sourceMappingURL=XernerxLog.d.ts.map
|
package/dist/tools/XernerxLog.js
CHANGED
|
@@ -1,84 +1,81 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
1
3
|
import { Style } from 'dumfunctions';
|
|
2
4
|
export default class XernerxLog {
|
|
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
|
-
if (this.tableLog) {
|
|
79
|
-
console.table(files, this.tableLog);
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
}
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
if (client == true) {
|
|
8
|
+
this.errorLog = true;
|
|
9
|
+
this.infoLog = true;
|
|
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((pkg) => {
|
|
28
|
+
pkg.version || version, pkg.name;
|
|
29
|
+
});
|
|
30
|
+
if (version != pkg.version)
|
|
31
|
+
new XernerxLog(true).warn(
|
|
32
|
+
`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, {
|
|
33
|
+
color: Style.TextColor.Cyan,
|
|
34
|
+
})}, run ${Style.log(`npm i ${pkg.name}@${pkg.version}`, { color: Style.BackgroundColor.Grey })} to update to the latest version.`
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
error(message, error) {
|
|
38
|
+
return this.errorLog
|
|
39
|
+
? console.error(`❗ | ${Style.log('Xernerx', { color: Style.TextColor.Red })} | ${Style.log(this.time(), { color: Style.TextColor.Cyan })} | ${message}${error ? ` | ${error.stack}` : ''}`)
|
|
40
|
+
: null;
|
|
41
|
+
}
|
|
42
|
+
ready() {
|
|
43
|
+
if (typeof this.client == 'boolean') return;
|
|
44
|
+
const client = this.client;
|
|
45
|
+
this.client.prependOnceListener('ready', async (synced) => {
|
|
46
|
+
this.info(
|
|
47
|
+
`${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), {
|
|
48
|
+
color: Style.TextColor.Cyan,
|
|
49
|
+
})} guild${client.guilds.cache.size > 1 ? 's' : ''}, using ${
|
|
50
|
+
client.settings.local ? Style.log((await client.guilds.fetch(client.settings.local)).name, { color: Style.TextColor.Blue }) : 'none'
|
|
51
|
+
} as local guild.`,
|
|
52
|
+
this.readyLog
|
|
53
|
+
);
|
|
54
|
+
const files = [];
|
|
55
|
+
for (const [id, data] of client.commands.message) {
|
|
56
|
+
files.push(data);
|
|
57
|
+
id;
|
|
58
|
+
}
|
|
59
|
+
for (const [id, data] of client.commands.slash) {
|
|
60
|
+
files.push(data);
|
|
61
|
+
id;
|
|
62
|
+
}
|
|
63
|
+
for (const [id, data] of client.commands.context) {
|
|
64
|
+
files.push(data);
|
|
65
|
+
id;
|
|
66
|
+
}
|
|
67
|
+
for (const [id, data] of client.events) {
|
|
68
|
+
files.push(data);
|
|
69
|
+
id;
|
|
70
|
+
}
|
|
71
|
+
for (const [id, data] of client.inhibitors) {
|
|
72
|
+
files.push(data);
|
|
73
|
+
id;
|
|
74
|
+
}
|
|
75
|
+
if (this.tableLog) {
|
|
76
|
+
console.table(files, this.tableLog);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
83
80
|
}
|
|
84
81
|
//# sourceMappingURL=XernerxLog.js.map
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
1
3
|
import { ChatInputCommandInteraction, DMChannel, Guild, GuildChannel, GuildMember, Message, MessageContextMenuCommandInteraction, User, UserContextMenuCommandInteraction } from 'discord.js';
|
|
2
4
|
import InteractionUtil from '../utils/InteractionUtil.js';
|
|
3
5
|
import MessageUtil from '../utils/MessageUtil.js';
|
|
4
6
|
export interface XernerxUser extends User {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
owner: boolean;
|
|
8
|
+
voted: boolean | null;
|
|
7
9
|
}
|
|
8
10
|
export interface XernerxMember extends GuildMember {
|
|
9
|
-
|
|
11
|
+
username: string;
|
|
10
12
|
}
|
|
11
13
|
export interface XernerxGuild extends Guild {}
|
|
12
14
|
export interface XernerxGuildChannel extends GuildChannel {}
|
|
13
15
|
export interface XernerxDMChannel extends DMChannel {}
|
|
14
16
|
interface XernerxCommand {}
|
|
15
17
|
export interface XernerxMessage extends Message, XernerxCommand {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
user: XernerxUser;
|
|
19
|
+
util: MessageUtil;
|
|
18
20
|
}
|
|
19
21
|
export interface XernerxSlashInteraction extends ChatInputCommandInteraction, XernerxCommand {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
user: XernerxUser;
|
|
23
|
+
util: InteractionUtil;
|
|
22
24
|
}
|
|
23
25
|
export interface XernerxUserContextInteraction extends UserContextMenuCommandInteraction, XernerxCommand {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
user: XernerxUser;
|
|
27
|
+
util: InteractionUtil;
|
|
26
28
|
}
|
|
27
29
|
export interface XernerxMessageContextInteraction extends MessageContextMenuCommandInteraction, XernerxCommand {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
user: XernerxUser;
|
|
31
|
+
util: InteractionUtil;
|
|
30
32
|
}
|
|
31
33
|
export {};
|
|
32
34
|
//# sourceMappingURL=extenders.d.ts.map
|
package/dist/types/extenders.js
CHANGED