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