xernerx 4.17.3 → 4.17.5
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 +96 -62
- package/dist/build/XernerxSlashCommand.js +176 -172
- package/dist/client/XernerxClient.d.ts +55 -45
- package/dist/client/XernerxClient.js +83 -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 +19 -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 +23 -23
- package/dist/tools/XernerxLog.js +125 -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 +192 -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 +4 -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 +3 -3
|
@@ -11,247 +11,250 @@ 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
|
+
ownerId?: string | Array<string>;
|
|
17
|
+
ceaseless?: boolean;
|
|
18
|
+
permissions?: {
|
|
19
|
+
user?: Array<PermissionNames> | Array<string> | null;
|
|
20
|
+
client?: Array<PermissionNames> | Array<string> | null;
|
|
21
|
+
dm?: boolean;
|
|
22
|
+
};
|
|
23
|
+
ignore?: {
|
|
24
|
+
owner?: boolean;
|
|
25
|
+
self?: boolean;
|
|
26
|
+
bots?: boolean;
|
|
27
|
+
system?: boolean;
|
|
28
|
+
users?: Array<string>;
|
|
29
|
+
channels?: Array<string>;
|
|
30
|
+
guilds?: Array<string>;
|
|
31
|
+
};
|
|
32
|
+
log?: {
|
|
33
|
+
ready?: boolean;
|
|
34
|
+
info?: boolean;
|
|
35
|
+
warn?: boolean;
|
|
36
|
+
error?: boolean;
|
|
37
|
+
table?: Array<'name' | 'aliases' | 'description' | 'filetype' | 'category'>;
|
|
38
|
+
format?: Array<'name' | 'node' | 'xernerx' | 'discordjs' | 'platform' | 'time' | 'date' | 'ram' | 'version' | 'author' | 'shard' | 'index'>;
|
|
39
|
+
};
|
|
40
|
+
cooldown?: {
|
|
41
|
+
command?: number;
|
|
42
|
+
cache?: number;
|
|
43
|
+
collections?: Array<string>;
|
|
44
|
+
};
|
|
45
45
|
}
|
|
46
46
|
export interface ModuleOptions {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
options: {
|
|
48
|
+
message?: MessageHandlerOptions;
|
|
49
|
+
slash?: SlashHandlerOptions;
|
|
50
|
+
context?: ContextHandlerOptions;
|
|
51
|
+
events?: EventHandlerOptions;
|
|
52
|
+
inhibitors?: InhibitorHandlerOptions;
|
|
53
|
+
};
|
|
54
|
+
commandHandler: CommandHandler;
|
|
55
|
+
eventHandler: EventHandler;
|
|
56
|
+
inhibitorHandler: InhibitorHandler;
|
|
57
|
+
integrationHandler: IntegrationHandler;
|
|
58
|
+
extensionHandler: ExtensionHandler;
|
|
59
59
|
}
|
|
60
60
|
export interface XernerxCommands {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
message: Collection<string, MessageCommandBuilder>;
|
|
62
|
+
slash: Collection<string, XernerxSlashCommand>;
|
|
63
|
+
context: Collection<string, XernerxContextCommand>;
|
|
64
64
|
}
|
|
65
65
|
export interface DBLOptions {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
topgg: {
|
|
67
|
+
token: string;
|
|
68
|
+
};
|
|
69
|
+
dbl: {
|
|
70
|
+
token: string;
|
|
71
|
+
};
|
|
72
|
+
config: {
|
|
73
|
+
emits: boolean;
|
|
74
|
+
logs: boolean;
|
|
75
|
+
};
|
|
76
76
|
}
|
|
77
77
|
export interface XernerxCache {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
messages: Collection<string, string>;
|
|
79
|
+
cooldowns: Collection<
|
|
80
|
+
string,
|
|
81
|
+
{
|
|
82
|
+
id: string;
|
|
83
|
+
command: string;
|
|
84
|
+
createdTimestamp: number;
|
|
85
|
+
}
|
|
86
|
+
>;
|
|
84
87
|
}
|
|
85
88
|
interface CommandHandlerOptions {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
directory: string;
|
|
90
|
+
cooldown?: number;
|
|
91
|
+
permissions?: {
|
|
92
|
+
user?: Array<PermissionNames> | Array<string> | null;
|
|
93
|
+
client?: Array<PermissionNames> | Array<string> | null;
|
|
94
|
+
dm?: boolean;
|
|
95
|
+
};
|
|
93
96
|
}
|
|
94
97
|
export interface MessageHandlerOptions extends CommandHandlerOptions {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
prefix: string | Array<string>;
|
|
99
|
+
allowMention?: boolean;
|
|
100
|
+
handleEdits?: boolean;
|
|
101
|
+
handleDeletes?: boolean;
|
|
102
|
+
handleTyping?: boolean;
|
|
100
103
|
}
|
|
101
104
|
export interface SlashHandlerOptions extends CommandHandlerOptions {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
defer?: {
|
|
106
|
+
reply?: boolean;
|
|
107
|
+
ephemeral?: boolean;
|
|
108
|
+
fetchReply?: boolean;
|
|
109
|
+
};
|
|
107
110
|
}
|
|
108
111
|
export interface ContextHandlerOptions extends CommandHandlerOptions {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
defer?: {
|
|
113
|
+
reply?: boolean;
|
|
114
|
+
ephemeral?: boolean;
|
|
115
|
+
fetchReply?: boolean;
|
|
116
|
+
};
|
|
114
117
|
}
|
|
115
118
|
export interface EventHandlerOptions {
|
|
116
|
-
|
|
119
|
+
directory: string;
|
|
117
120
|
}
|
|
118
121
|
export interface InhibitorHandlerOptions {
|
|
119
|
-
|
|
122
|
+
directory: string;
|
|
120
123
|
}
|
|
121
124
|
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
|
-
|
|
125
|
+
name: string;
|
|
126
|
+
description?: string | null;
|
|
127
|
+
usage?: string | null;
|
|
128
|
+
info?: string | null;
|
|
129
|
+
category?: string | null;
|
|
130
|
+
cooldown?: number | null;
|
|
131
|
+
global?: boolean;
|
|
132
|
+
channel?: Array<keyof typeof ChannelType> | keyof typeof ChannelType | null;
|
|
133
|
+
ignore?: {
|
|
134
|
+
owner?: boolean;
|
|
135
|
+
users?: Array<string>;
|
|
136
|
+
channels?: Array<string>;
|
|
137
|
+
guilds?: Array<string>;
|
|
138
|
+
voice?: boolean;
|
|
139
|
+
};
|
|
140
|
+
strict?: {
|
|
141
|
+
owner?: boolean;
|
|
142
|
+
users?: Array<string>;
|
|
143
|
+
channels?: Array<string>;
|
|
144
|
+
guilds?: Array<string>;
|
|
145
|
+
voice?: boolean;
|
|
146
|
+
};
|
|
147
|
+
permissions?: {
|
|
148
|
+
user?: Array<PermissionNames> | Array<string> | null;
|
|
149
|
+
client?: Array<PermissionNames> | Array<string> | null;
|
|
150
|
+
dm?: boolean;
|
|
151
|
+
};
|
|
149
152
|
}
|
|
150
153
|
export interface MessageCommandOptions extends CommandOptions {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
aliases?: Array<string>;
|
|
155
|
+
separator?: string;
|
|
156
|
+
prefix?: Array<string> | string;
|
|
157
|
+
regex?: RegExp;
|
|
158
|
+
channelType?: Array<ChannelType>;
|
|
159
|
+
args?: Array<MessageCommandArgumentOptions>;
|
|
160
|
+
flags?: Array<MessageCommandFlagOptions>;
|
|
158
161
|
}
|
|
159
162
|
export interface MessageCommandArgumentOptions {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
163
|
+
type: MessageCommandArgumentType;
|
|
164
|
+
name: string;
|
|
165
|
+
content?: Array<string>;
|
|
166
|
+
match?: string | Array<string>;
|
|
167
|
+
description?: string;
|
|
168
|
+
default?: string | Function;
|
|
169
|
+
separator?: string | RegExp;
|
|
170
|
+
prompt?: {
|
|
171
|
+
reply?: string;
|
|
172
|
+
send?: string;
|
|
173
|
+
};
|
|
171
174
|
}
|
|
172
175
|
export interface MessageCommandFlagOptions {
|
|
173
|
-
|
|
174
|
-
|
|
176
|
+
name: string;
|
|
177
|
+
match: string;
|
|
175
178
|
}
|
|
176
179
|
export interface MessageCommandArguments {
|
|
177
|
-
|
|
178
|
-
|
|
180
|
+
args: Record<string, unknown> | null;
|
|
181
|
+
flags: Record<string, boolean> | null;
|
|
179
182
|
}
|
|
180
183
|
export interface SlashCommandOptions extends CommandOptions {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
184
|
+
description: string;
|
|
185
|
+
nameLocalizations?: Record<Locales, string | null> | null;
|
|
186
|
+
descriptionLocalizations?: Record<Locales, string | null> | null;
|
|
187
|
+
defer?: {
|
|
188
|
+
reply?: boolean;
|
|
189
|
+
ephemeral?: boolean;
|
|
190
|
+
fetchReply?: boolean;
|
|
191
|
+
};
|
|
192
|
+
args?: Array<SlashCommandArgumentOptions>;
|
|
193
|
+
subcommands?: Array<SlashCommandSubcommandOptions>;
|
|
194
|
+
groups?: Array<SlashCommandGroupOptions>;
|
|
192
195
|
}
|
|
193
196
|
export interface ContextCommandOptions extends CommandOptions {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
type: 'user' | 'message';
|
|
198
|
+
nameLocalizations?: Record<Locales, string | null> | null;
|
|
199
|
+
defer?: {
|
|
200
|
+
reply?: boolean;
|
|
201
|
+
ephemeral?: boolean;
|
|
202
|
+
fetchReply?: boolean;
|
|
203
|
+
};
|
|
201
204
|
}
|
|
202
205
|
export interface SlashCommandArgumentOptions {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
type: SlashCommandArgumentType;
|
|
207
|
+
name: string;
|
|
208
|
+
description: string;
|
|
209
|
+
required?: boolean;
|
|
210
|
+
autocomplete?: boolean;
|
|
211
|
+
choices?: Array<Record<string, string>>;
|
|
209
212
|
}
|
|
210
213
|
export interface SlashCommandSubcommandOptions {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
+
name: string;
|
|
215
|
+
description: string;
|
|
216
|
+
args?: Array<SlashCommandArgumentOptions>;
|
|
214
217
|
}
|
|
215
218
|
export interface SlashCommandGroupOptions {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
+
name: string;
|
|
220
|
+
description: string;
|
|
221
|
+
subcommands: Array<SlashCommandSubcommandOptions>;
|
|
219
222
|
}
|
|
220
223
|
export interface SlashCommandArguments<T = SlashCommandArgumentType> {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
+
args: Record<string, any>;
|
|
225
|
+
subcommand: string;
|
|
226
|
+
group: string;
|
|
224
227
|
}
|
|
225
228
|
export interface XernerxEventOptions {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
229
|
+
name: keyof XernerxClientEvents;
|
|
230
|
+
emitter?: 'client' | 'process';
|
|
231
|
+
type?: 'discord' | 'node';
|
|
232
|
+
once?: boolean;
|
|
230
233
|
}
|
|
231
234
|
export interface XernerxInhibitorOptions {
|
|
232
|
-
|
|
233
|
-
|
|
235
|
+
name: string;
|
|
236
|
+
type: InhibitorType;
|
|
234
237
|
}
|
|
235
238
|
export interface PresenceOptions {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
text: string;
|
|
240
|
+
type?: keyof typeof ActivityType;
|
|
241
|
+
url?: string;
|
|
242
|
+
status?: PresenceStatusData;
|
|
243
|
+
interval?: number;
|
|
241
244
|
}
|
|
242
245
|
export type ContextCommandArguments<T extends 'user' | 'message'> = T extends 'user' ? XernerxUser : XernerxMessage;
|
|
243
246
|
export interface PaginatorOptions {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
247
|
+
type?: 'button' | 'select-menu' | 'combined';
|
|
248
|
+
buttons?: Array<string>;
|
|
249
|
+
description?: boolean;
|
|
250
|
+
placeholder?: string;
|
|
251
|
+
index?: number;
|
|
252
|
+
send?: boolean;
|
|
253
|
+
filter?: Function;
|
|
254
|
+
time?: number;
|
|
252
255
|
}
|
|
253
256
|
export interface ResolveCommandOptions {
|
|
254
|
-
|
|
255
|
-
|
|
257
|
+
type?: 'MessageCommand' | 'SlashCommand' | 'ContextCommand' | 'Interaction';
|
|
258
|
+
name?: string;
|
|
256
259
|
}
|
|
257
260
|
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
|
}
|