xernerx 4.17.4 → 4.17.6
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 +75 -47
- package/dist/build/XernerxContextCommand.js +119 -115
- package/dist/build/XernerxEvent.d.ts +10 -10
- package/dist/build/XernerxEvent.js +17 -17
- package/dist/build/XernerxInhibitor.d.ts +39 -15
- package/dist/build/XernerxInhibitor.js +18 -18
- package/dist/build/XernerxMessageCommand.d.ts +78 -52
- package/dist/build/XernerxMessageCommand.js +118 -114
- package/dist/build/XernerxSlashCommand.d.ts +97 -63
- package/dist/build/XernerxSlashCommand.js +176 -172
- package/dist/client/XernerxClient.d.ts +61 -47
- package/dist/client/XernerxClient.js +92 -88
- package/dist/client/XernerxShardClient.d.ts +14 -14
- package/dist/client/XernerxShardClient.js +61 -47
- package/dist/functions/deploy.js +45 -52
- package/dist/functions/load.js +28 -29
- package/dist/functions/reload.js +23 -24
- package/dist/functions/setPresence.d.ts +1 -1
- package/dist/functions/setPresence.js +17 -16
- package/dist/functions/xernerxUser.js +5 -6
- package/dist/handlers/CommandHandler.d.ts +10 -10
- package/dist/handlers/CommandHandler.js +311 -336
- package/dist/handlers/EventHandler.d.ts +3 -3
- package/dist/handlers/EventHandler.js +48 -21
- package/dist/handlers/ExtensionHandler.d.ts +3 -3
- package/dist/handlers/ExtensionHandler.js +23 -23
- package/dist/handlers/Handler.d.ts +22 -14
- package/dist/handlers/Handler.js +46 -50
- package/dist/handlers/InhibitorHandler.d.ts +3 -3
- package/dist/handlers/InhibitorHandler.js +25 -23
- package/dist/handlers/IntegrationHandler.d.ts +6 -6
- package/dist/handlers/IntegrationHandler.js +20 -20
- package/dist/main.d.ts +28 -21
- package/dist/main.js +28 -21
- package/dist/models/Arguments.d.ts +4 -1
- package/dist/models/Arguments.js +134 -149
- package/dist/models/Cooldowns.d.ts +6 -6
- package/dist/models/Cooldowns.js +25 -29
- package/dist/tools/XernerxError.d.ts +4 -4
- package/dist/tools/XernerxError.js +8 -8
- package/dist/tools/XernerxIntents.d.ts +2 -2
- package/dist/tools/XernerxIntents.js +21 -21
- package/dist/tools/XernerxLog.d.ts +25 -23
- package/dist/tools/XernerxLog.js +139 -110
- package/dist/tools/XernerxText.d.ts +23 -23
- package/dist/tools/XernerxText.js +79 -89
- package/dist/types/extenders.d.ts +55 -47
- package/dist/types/interfaces.d.ts +195 -189
- package/dist/types/types.d.ts +104 -5
- package/dist/utils/ClientUtil.d.ts +12 -9
- package/dist/utils/ClientUtil.js +96 -79
- package/dist/utils/InteractionUtil.d.ts +13 -13
- package/dist/utils/InteractionUtil.js +148 -147
- package/dist/utils/MessageUtil.d.ts +14 -14
- package/dist/utils/MessageUtil.js +162 -161
- package/dist/utils/Util.d.ts +7 -4
- package/dist/utils/Util.js +7 -7
- package/dist/validators/commandValidation.d.ts +4 -1
- package/dist/validators/commandValidation.js +157 -114
- package/dist/validators/inhibitorValidations.d.ts +21 -2
- package/dist/validators/inhibitorValidations.js +39 -39
- package/package.json +6 -3
|
@@ -11,247 +11,253 @@ import { Locales, MessageCommandArgumentType, PermissionNames, SlashCommandArgum
|
|
|
11
11
|
import ExtensionHandler from '../handlers/ExtensionHandler.js';
|
|
12
12
|
import { XernerxClientEvents, XernerxMessage, XernerxUser } from './extenders.js';
|
|
13
13
|
export interface XernerxOptions {
|
|
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
|
-
|
|
14
|
+
local: string;
|
|
15
|
+
global?: boolean;
|
|
16
|
+
debug?: boolean;
|
|
17
|
+
ownerId?: string | Array<string>;
|
|
18
|
+
ceaseless?: boolean;
|
|
19
|
+
permissions?: {
|
|
20
|
+
user?: Array<PermissionNames> | Array<string> | null;
|
|
21
|
+
client?: Array<PermissionNames> | Array<string> | null;
|
|
22
|
+
dm?: boolean;
|
|
23
|
+
};
|
|
24
|
+
ignore?: {
|
|
25
|
+
owner?: boolean;
|
|
26
|
+
self?: boolean;
|
|
27
|
+
bots?: boolean;
|
|
28
|
+
system?: boolean;
|
|
29
|
+
users?: Array<string>;
|
|
30
|
+
channels?: Array<string>;
|
|
31
|
+
guilds?: Array<string>;
|
|
32
|
+
};
|
|
33
|
+
log?:
|
|
34
|
+
| {
|
|
35
|
+
ready?: boolean;
|
|
36
|
+
info?: boolean;
|
|
37
|
+
warn?: boolean;
|
|
38
|
+
error?: boolean;
|
|
39
|
+
table?: Array<'name' | 'aliases' | 'description' | 'filetype' | 'category'>;
|
|
40
|
+
format?: Array<'name' | 'node' | 'xernerx' | 'discordjs' | 'platform' | 'time' | 'date' | 'ram' | 'version' | 'author' | 'shard' | 'index'>;
|
|
41
|
+
}
|
|
42
|
+
| boolean;
|
|
43
|
+
cooldown?: {
|
|
44
|
+
command?: number;
|
|
45
|
+
cache?: number;
|
|
46
|
+
collections?: Array<string>;
|
|
47
|
+
};
|
|
45
48
|
}
|
|
46
49
|
export interface ModuleOptions {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
options: {
|
|
51
|
+
message?: MessageHandlerOptions;
|
|
52
|
+
slash?: SlashHandlerOptions;
|
|
53
|
+
context?: ContextHandlerOptions;
|
|
54
|
+
events?: EventHandlerOptions;
|
|
55
|
+
inhibitors?: InhibitorHandlerOptions;
|
|
56
|
+
};
|
|
57
|
+
commandHandler: CommandHandler;
|
|
58
|
+
eventHandler: EventHandler;
|
|
59
|
+
inhibitorHandler: InhibitorHandler;
|
|
60
|
+
integrationHandler: IntegrationHandler;
|
|
61
|
+
extensionHandler: ExtensionHandler;
|
|
59
62
|
}
|
|
60
63
|
export interface XernerxCommands {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
message: Collection<string, MessageCommandBuilder>;
|
|
65
|
+
slash: Collection<string, XernerxSlashCommand>;
|
|
66
|
+
context: Collection<string, XernerxContextCommand>;
|
|
64
67
|
}
|
|
65
68
|
export interface DBLOptions {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
topgg: {
|
|
70
|
+
token: string;
|
|
71
|
+
};
|
|
72
|
+
dbl: {
|
|
73
|
+
token: string;
|
|
74
|
+
};
|
|
75
|
+
config: {
|
|
76
|
+
emits: boolean;
|
|
77
|
+
logs: boolean;
|
|
78
|
+
};
|
|
76
79
|
}
|
|
77
80
|
export interface XernerxCache {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
messages: Collection<string, string>;
|
|
82
|
+
cooldowns: Collection<
|
|
83
|
+
string,
|
|
84
|
+
{
|
|
85
|
+
id: string;
|
|
86
|
+
command: string;
|
|
87
|
+
createdTimestamp: number;
|
|
88
|
+
}
|
|
89
|
+
>;
|
|
84
90
|
}
|
|
85
91
|
interface CommandHandlerOptions {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
directory: string;
|
|
93
|
+
cooldown?: number;
|
|
94
|
+
permissions?: {
|
|
95
|
+
user?: Array<PermissionNames> | Array<string> | null;
|
|
96
|
+
client?: Array<PermissionNames> | Array<string> | null;
|
|
97
|
+
dm?: boolean;
|
|
98
|
+
};
|
|
93
99
|
}
|
|
94
100
|
export interface MessageHandlerOptions extends CommandHandlerOptions {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
101
|
+
prefix: string | Array<string>;
|
|
102
|
+
allowMention?: boolean;
|
|
103
|
+
handleEdits?: boolean;
|
|
104
|
+
handleDeletes?: boolean;
|
|
105
|
+
handleTyping?: boolean;
|
|
100
106
|
}
|
|
101
107
|
export interface SlashHandlerOptions extends CommandHandlerOptions {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
108
|
+
defer?: {
|
|
109
|
+
reply?: boolean;
|
|
110
|
+
ephemeral?: boolean;
|
|
111
|
+
fetchReply?: boolean;
|
|
112
|
+
};
|
|
107
113
|
}
|
|
108
114
|
export interface ContextHandlerOptions extends CommandHandlerOptions {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
115
|
+
defer?: {
|
|
116
|
+
reply?: boolean;
|
|
117
|
+
ephemeral?: boolean;
|
|
118
|
+
fetchReply?: boolean;
|
|
119
|
+
};
|
|
114
120
|
}
|
|
115
121
|
export interface EventHandlerOptions {
|
|
116
|
-
|
|
122
|
+
directory: string;
|
|
117
123
|
}
|
|
118
124
|
export interface InhibitorHandlerOptions {
|
|
119
|
-
|
|
125
|
+
directory: string;
|
|
120
126
|
}
|
|
121
127
|
interface CommandOptions {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
128
|
+
name: string;
|
|
129
|
+
description?: string | null;
|
|
130
|
+
usage?: string | null;
|
|
131
|
+
info?: string | null;
|
|
132
|
+
category?: string | null;
|
|
133
|
+
cooldown?: number | null;
|
|
134
|
+
global?: boolean;
|
|
135
|
+
channel?: Array<keyof typeof ChannelType> | keyof typeof ChannelType | null;
|
|
136
|
+
ignore?: {
|
|
137
|
+
owner?: boolean;
|
|
138
|
+
users?: Array<string>;
|
|
139
|
+
channels?: Array<string>;
|
|
140
|
+
guilds?: Array<string>;
|
|
141
|
+
voice?: boolean;
|
|
142
|
+
};
|
|
143
|
+
strict?: {
|
|
144
|
+
owner?: boolean;
|
|
145
|
+
users?: Array<string>;
|
|
146
|
+
channels?: Array<string>;
|
|
147
|
+
guilds?: Array<string>;
|
|
148
|
+
voice?: boolean;
|
|
149
|
+
};
|
|
150
|
+
permissions?: {
|
|
151
|
+
user?: Array<PermissionNames> | Array<string> | null;
|
|
152
|
+
client?: Array<PermissionNames> | Array<string> | null;
|
|
153
|
+
dm?: boolean;
|
|
154
|
+
};
|
|
149
155
|
}
|
|
150
156
|
export interface MessageCommandOptions extends CommandOptions {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
aliases?: Array<string>;
|
|
158
|
+
separator?: string;
|
|
159
|
+
prefix?: Array<string> | string;
|
|
160
|
+
regex?: RegExp;
|
|
161
|
+
channelType?: Array<ChannelType>;
|
|
162
|
+
args?: Array<MessageCommandArgumentOptions>;
|
|
163
|
+
flags?: Array<MessageCommandFlagOptions>;
|
|
158
164
|
}
|
|
159
165
|
export interface MessageCommandArgumentOptions {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
166
|
+
type: MessageCommandArgumentType;
|
|
167
|
+
name: string;
|
|
168
|
+
content?: Array<string>;
|
|
169
|
+
match?: string | Array<string>;
|
|
170
|
+
description?: string;
|
|
171
|
+
default?: string | Function;
|
|
172
|
+
separator?: string | RegExp;
|
|
173
|
+
prompt?: {
|
|
174
|
+
reply?: string;
|
|
175
|
+
send?: string;
|
|
176
|
+
};
|
|
171
177
|
}
|
|
172
178
|
export interface MessageCommandFlagOptions {
|
|
173
|
-
|
|
174
|
-
|
|
179
|
+
name: string;
|
|
180
|
+
match: string;
|
|
175
181
|
}
|
|
176
182
|
export interface MessageCommandArguments {
|
|
177
|
-
|
|
178
|
-
|
|
183
|
+
args: Record<string, unknown> | null;
|
|
184
|
+
flags: Record<string, boolean> | null;
|
|
179
185
|
}
|
|
180
186
|
export interface SlashCommandOptions extends CommandOptions {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
187
|
+
description: string;
|
|
188
|
+
nameLocalizations?: Record<Locales, string | null> | null;
|
|
189
|
+
descriptionLocalizations?: Record<Locales, string | null> | null;
|
|
190
|
+
defer?: {
|
|
191
|
+
reply?: boolean;
|
|
192
|
+
ephemeral?: boolean;
|
|
193
|
+
fetchReply?: boolean;
|
|
194
|
+
};
|
|
195
|
+
args?: Array<SlashCommandArgumentOptions>;
|
|
196
|
+
subcommands?: Array<SlashCommandSubcommandOptions>;
|
|
197
|
+
groups?: Array<SlashCommandGroupOptions>;
|
|
192
198
|
}
|
|
193
199
|
export interface ContextCommandOptions extends CommandOptions {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
200
|
+
type: 'user' | 'message';
|
|
201
|
+
nameLocalizations?: Record<Locales, string | null> | null;
|
|
202
|
+
defer?: {
|
|
203
|
+
reply?: boolean;
|
|
204
|
+
ephemeral?: boolean;
|
|
205
|
+
fetchReply?: boolean;
|
|
206
|
+
};
|
|
201
207
|
}
|
|
202
208
|
export interface SlashCommandArgumentOptions {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
+
type: SlashCommandArgumentType;
|
|
210
|
+
name: string;
|
|
211
|
+
description: string;
|
|
212
|
+
required?: boolean;
|
|
213
|
+
autocomplete?: boolean;
|
|
214
|
+
choices?: Array<Record<string, string>>;
|
|
209
215
|
}
|
|
210
216
|
export interface SlashCommandSubcommandOptions {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
217
|
+
name: string;
|
|
218
|
+
description: string;
|
|
219
|
+
args?: Array<SlashCommandArgumentOptions>;
|
|
214
220
|
}
|
|
215
221
|
export interface SlashCommandGroupOptions {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
222
|
+
name: string;
|
|
223
|
+
description: string;
|
|
224
|
+
subcommands: Array<SlashCommandSubcommandOptions>;
|
|
219
225
|
}
|
|
220
226
|
export interface SlashCommandArguments<T = SlashCommandArgumentType> {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
227
|
+
args: Record<string, any>;
|
|
228
|
+
subcommand: string;
|
|
229
|
+
group: string;
|
|
224
230
|
}
|
|
225
231
|
export interface XernerxEventOptions {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
232
|
+
name: keyof XernerxClientEvents;
|
|
233
|
+
emitter?: 'client' | 'process';
|
|
234
|
+
type?: 'discord' | 'node';
|
|
235
|
+
once?: boolean;
|
|
230
236
|
}
|
|
231
237
|
export interface XernerxInhibitorOptions {
|
|
232
|
-
|
|
233
|
-
|
|
238
|
+
name: string;
|
|
239
|
+
type: InhibitorType;
|
|
234
240
|
}
|
|
235
241
|
export interface PresenceOptions {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
242
|
+
text: string;
|
|
243
|
+
type?: keyof typeof ActivityType;
|
|
244
|
+
url?: string;
|
|
245
|
+
status?: PresenceStatusData;
|
|
246
|
+
interval?: number;
|
|
241
247
|
}
|
|
242
248
|
export type ContextCommandArguments<T extends 'user' | 'message'> = T extends 'user' ? XernerxUser : XernerxMessage;
|
|
243
249
|
export interface PaginatorOptions {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
type?: 'button' | 'select-menu' | 'combined';
|
|
251
|
+
buttons?: Array<string>;
|
|
252
|
+
description?: boolean;
|
|
253
|
+
placeholder?: string;
|
|
254
|
+
index?: number;
|
|
255
|
+
send?: boolean;
|
|
256
|
+
filter?: Function;
|
|
257
|
+
time?: number;
|
|
252
258
|
}
|
|
253
259
|
export interface ResolveCommandOptions {
|
|
254
|
-
|
|
255
|
-
|
|
260
|
+
type?: 'MessageCommand' | 'SlashCommand' | 'ContextCommand' | 'Interaction';
|
|
261
|
+
name?: string;
|
|
256
262
|
}
|
|
257
263
|
export {};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,12 +1,111 @@
|
|
|
1
1
|
/** @format */
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
SlashCommandBooleanOption,
|
|
4
|
+
SlashCommandChannelOption,
|
|
5
|
+
SlashCommandIntegerOption,
|
|
6
|
+
SlashCommandMentionableOption,
|
|
7
|
+
SlashCommandNumberOption,
|
|
8
|
+
SlashCommandRoleOption,
|
|
9
|
+
SlashCommandStringOption,
|
|
10
|
+
SlashCommandUserOption,
|
|
11
|
+
} from 'discord.js';
|
|
3
12
|
import { XernerxMessageContextInteraction, XernerxSlashInteraction, XernerxUserContextInteraction } from './extenders.js';
|
|
4
13
|
export type filetype = 'MessageCommand' | 'SlashCommand' | 'ContextCommand' | 'Event' | 'Inhibitor';
|
|
5
|
-
export type Locales =
|
|
14
|
+
export type Locales =
|
|
15
|
+
| 'en-US'
|
|
16
|
+
| 'en-GB'
|
|
17
|
+
| 'bg'
|
|
18
|
+
| 'zh-CN'
|
|
19
|
+
| 'zh-TW'
|
|
20
|
+
| 'hr'
|
|
21
|
+
| 'cs'
|
|
22
|
+
| 'da'
|
|
23
|
+
| 'nl'
|
|
24
|
+
| 'fi'
|
|
25
|
+
| 'fr'
|
|
26
|
+
| 'de'
|
|
27
|
+
| 'el'
|
|
28
|
+
| 'hi'
|
|
29
|
+
| 'hu'
|
|
30
|
+
| 'it'
|
|
31
|
+
| 'ja'
|
|
32
|
+
| 'ko'
|
|
33
|
+
| 'lt'
|
|
34
|
+
| 'no'
|
|
35
|
+
| 'pl'
|
|
36
|
+
| 'pt-BR'
|
|
37
|
+
| 'ro'
|
|
38
|
+
| 'ru'
|
|
39
|
+
| 'es-ES'
|
|
40
|
+
| 'sv-SE'
|
|
41
|
+
| 'th'
|
|
42
|
+
| 'tr'
|
|
43
|
+
| 'uk'
|
|
44
|
+
| 'vi';
|
|
6
45
|
export type SlashCommandArgumentType = 'attachment' | 'boolean' | 'channel' | 'integer' | 'mentionable' | 'number' | 'role' | 'string' | 'user';
|
|
7
46
|
export type SlashCommandOptionChoices = SlashCommandStringOption | SlashCommandNumberOption | SlashCommandIntegerOption;
|
|
8
47
|
export type SlashCommandOption = SlashCommandOptionChoices | SlashCommandBooleanOption | SlashCommandUserOption | SlashCommandChannelOption | SlashCommandRoleOption | SlashCommandMentionableOption;
|
|
9
|
-
export type MessageCommandArgumentType =
|
|
10
|
-
|
|
11
|
-
|
|
48
|
+
export type MessageCommandArgumentType =
|
|
49
|
+
| 'string'
|
|
50
|
+
| 'number'
|
|
51
|
+
| 'boolean'
|
|
52
|
+
| 'confirm'
|
|
53
|
+
| 'channel'
|
|
54
|
+
| 'guild'
|
|
55
|
+
| 'integer'
|
|
56
|
+
| 'mentionable'
|
|
57
|
+
| 'role'
|
|
58
|
+
| 'user'
|
|
59
|
+
| 'message'
|
|
60
|
+
| 'member'
|
|
61
|
+
| 'list'
|
|
62
|
+
| 'option'
|
|
63
|
+
| 'rest';
|
|
64
|
+
export type XernerxInteraction<T extends XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction> = T extends XernerxSlashInteraction
|
|
65
|
+
? XernerxSlashInteraction
|
|
66
|
+
: T extends XernerxUserContextInteraction
|
|
67
|
+
? XernerxUserContextInteraction
|
|
68
|
+
: XernerxMessageContextInteraction;
|
|
69
|
+
export type PermissionNames =
|
|
70
|
+
| 'create instant invite'
|
|
71
|
+
| 'kick members'
|
|
72
|
+
| 'ban members'
|
|
73
|
+
| 'administrator'
|
|
74
|
+
| 'manage channels'
|
|
75
|
+
| 'manage guild'
|
|
76
|
+
| 'add reactions'
|
|
77
|
+
| 'view audit log'
|
|
78
|
+
| 'priority speaker'
|
|
79
|
+
| 'stream'
|
|
80
|
+
| 'view channel'
|
|
81
|
+
| 'send messages'
|
|
82
|
+
| 'send tts messages'
|
|
83
|
+
| 'manage messages'
|
|
84
|
+
| 'embed links'
|
|
85
|
+
| 'attach files'
|
|
86
|
+
| 'read message history'
|
|
87
|
+
| 'mention everyone'
|
|
88
|
+
| 'use external emojis'
|
|
89
|
+
| 'view guild insights'
|
|
90
|
+
| 'connect'
|
|
91
|
+
| 'speak'
|
|
92
|
+
| 'mute members'
|
|
93
|
+
| 'deafen members'
|
|
94
|
+
| 'move members'
|
|
95
|
+
| 'use vad'
|
|
96
|
+
| 'change nickname'
|
|
97
|
+
| 'manage nicknames'
|
|
98
|
+
| 'manage roles'
|
|
99
|
+
| 'manage webhooks'
|
|
100
|
+
| 'manage emojis and stickers'
|
|
101
|
+
| 'use application commands'
|
|
102
|
+
| 'request to speak'
|
|
103
|
+
| 'manage events'
|
|
104
|
+
| 'manage threads'
|
|
105
|
+
| 'create public threads'
|
|
106
|
+
| 'create private threads'
|
|
107
|
+
| 'use external stickers'
|
|
108
|
+
| 'send messages in threads'
|
|
109
|
+
| 'start embedded activities'
|
|
110
|
+
| 'moderate members';
|
|
12
111
|
export type InhibitorType = '*' | 'message' | 'interaction' | 'command' | 'channel' | 'user' | 'member' | 'guild' | 'contextCommand' | 'messageCommand' | 'slashCommand';
|
|
@@ -7,13 +7,16 @@ import XernerxContextCommand from '../build/XernerxContextCommand.js';
|
|
|
7
7
|
import XernerxMessageCommand from '../build/XernerxMessageCommand.js';
|
|
8
8
|
import XernerxSlashCommand from '../build/XernerxSlashCommand.js';
|
|
9
9
|
export default class ClientUtil extends Util {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
hasVoted: Function;
|
|
11
|
+
constructor(client: XernerxClient);
|
|
12
|
+
setPresence(options: PresenceOptions): import('discord.js').ClientPresence | undefined;
|
|
13
|
+
private resolveCooldown;
|
|
14
|
+
resolveCommand(
|
|
15
|
+
options: ResolveCommandOptions
|
|
16
|
+
): Promise<XernerxSlashCommand | XernerxContextCommand | XernerxMessageCommand | Collection<string, XernerxSlashCommand | XernerxContextCommand | XernerxMessageCommand>>;
|
|
17
|
+
resolveChannel(query: string | Record<string, string>): Promise<import('discord.js').Channel | null>;
|
|
18
|
+
resolveGuild(query: string | Record<string, string>): Promise<import('discord.js').Guild | null>;
|
|
19
|
+
uptime(timestamp?: number | null): string;
|
|
20
|
+
commands(): (XernerxSlashCommand | XernerxContextCommand | XernerxMessageCommand)[];
|
|
21
|
+
commandsList(): Collection<string, object>;
|
|
19
22
|
}
|