xernerx 3.4.3 → 3.5.0
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 +10 -10
- package/dist/build/ContextCommandBuilder.js +93 -86
- package/dist/build/EventBuilder.js +34 -35
- package/dist/build/InhibitorBuilder.js +27 -27
- package/dist/build/MessageCommandBuilder.js +90 -78
- package/dist/build/SlashCommandBuilder.js +125 -118
- package/dist/client/XernerxClient.js +101 -83
- package/dist/handlers/CommandHandler.js +42 -42
- package/dist/handlers/EventHandler.js +16 -16
- package/dist/handlers/Handler.js +250 -250
- package/dist/handlers/InhibitorHandler.js +21 -21
- package/dist/main.cjs +2012 -0
- package/dist/main.js +42 -42
- package/dist/models/CommandArguments.js +121 -123
- package/dist/models/Events.js +294 -304
- package/dist/models/Extensions.js +23 -23
- package/dist/tools/XernerxError.js +8 -8
- package/dist/tools/package.js +37 -41
- package/dist/types/enums.js +35 -35
- package/dist/types/interfaces.js +1 -1
- package/dist/types/options.js +1 -1
- package/dist/types/types.js +1 -1
- package/dist/utils/ClientUtil.js +222 -218
- package/dist/utils/CommandUtil.js +248 -260
- package/dist/validators/CommandValidations.js +183 -185
- package/dist/validators/InhibitorValidations.js +42 -42
- package/dist/validators/Shapes.js +1 -0
- package/package.json +54 -39
- package/types/build/ContextCommandBuilder.d.ts +68 -0
- package/{dist → types}/build/EventBuilder.d.ts +21 -17
- package/{dist → types}/build/InhibitorBuilder.d.ts +19 -20
- package/types/build/MessageCommandBuilder.d.ts +59 -0
- package/types/build/SlashCommandBuilder.d.ts +64 -0
- package/{dist → types}/client/XernerxClient.d.ts +28 -28
- package/{dist → types}/handlers/CommandHandler.d.ts +27 -27
- package/{dist → types}/handlers/EventHandler.d.ts +13 -13
- package/{dist → types}/handlers/Handler.d.ts +57 -57
- package/{dist → types}/handlers/InhibitorHandler.d.ts +18 -18
- package/{dist → types}/main.d.ts +44 -30
- package/{dist → types}/models/CommandArguments.d.ts +17 -17
- package/{dist → types}/models/Events.d.ts +24 -24
- package/{dist → types}/models/Extensions.d.ts +7 -7
- package/{dist → types}/tools/XernerxError.d.ts +5 -5
- package/{dist → types}/tools/package.d.ts +38 -38
- package/types/types/enums.d.ts +44 -0
- package/{dist → types}/types/interfaces.d.ts +25 -25
- package/{dist → types}/types/options.d.ts +241 -206
- package/{dist → types}/types/types.d.ts +61 -32
- package/{dist → types}/utils/ClientUtil.d.ts +25 -25
- package/{dist → types}/utils/CommandUtil.d.ts +58 -56
- package/{dist → types}/validators/CommandValidations.d.ts +12 -7
- package/{dist → types}/validators/InhibitorValidations.d.ts +11 -11
- package/types/validators/Shapes.d.ts +1 -0
- package/dist/build/ContextCommandBuilder.d.ts +0 -42
- package/dist/build/MessageCommandBuilder.d.ts +0 -42
- package/dist/build/SlashCommandBuilder.d.ts +0 -40
- package/dist/build/XContextCommandBuilder.d.ts +0 -40
- package/dist/build/XContextCommandBuilder.js +0 -84
- package/dist/build/XEventBuilder.d.ts +0 -17
- package/dist/build/XEventBuilder.js +0 -35
- package/dist/build/XInhibitorBuilder.d.ts +0 -20
- package/dist/build/XInhibitorBuilder.js +0 -28
- package/dist/build/XMessageCommandBuilder.d.ts +0 -42
- package/dist/build/XMessageCommandBuilder.js +0 -80
- package/dist/build/XSlashCommandBuilder.d.ts +0 -36
- package/dist/build/XSlashCommandBuilder.js +0 -114
- package/dist/models/CommandValidations.d.ts +0 -4
- package/dist/models/CommandValidations.js +0 -183
- package/dist/models/InhibitorValidations.d.ts +0 -12
- package/dist/models/InhibitorValidations.js +0 -42
- package/dist/types/enums.d.ts +0 -35
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import XernerxExtensionBuilder from 'xernerx-extension-builder';
|
|
2
|
-
import XernerxClient from '../client/XernerxClient.js';
|
|
3
|
-
export default class Extensions {
|
|
4
|
-
client: XernerxClient;
|
|
5
|
-
constructor(client: XernerxClient);
|
|
6
|
-
load(extensions: Array<XernerxExtensionBuilder>, logging?: boolean): Promise<void>;
|
|
7
|
-
}
|
|
1
|
+
import XernerxExtensionBuilder from 'xernerx-extension-builder';
|
|
2
|
+
import XernerxClient from '../client/XernerxClient.js';
|
|
3
|
+
export default class Extensions {
|
|
4
|
+
client: XernerxClient;
|
|
5
|
+
constructor(client: XernerxClient);
|
|
6
|
+
load(extensions: Array<XernerxExtensionBuilder>, logging?: boolean): Promise<void>;
|
|
7
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export default class XernerxError {
|
|
2
|
-
name: string;
|
|
3
|
-
message: string;
|
|
4
|
-
constructor(message?: string);
|
|
5
|
-
}
|
|
1
|
+
export default class XernerxError {
|
|
2
|
+
name: string;
|
|
3
|
+
message: string;
|
|
4
|
+
constructor(message?: string);
|
|
5
|
+
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
name: string;
|
|
3
|
-
version: string;
|
|
4
|
-
type: string;
|
|
5
|
-
description: string;
|
|
6
|
-
main: string;
|
|
7
|
-
keywords: string[];
|
|
8
|
-
author: string;
|
|
9
|
-
license: string;
|
|
10
|
-
homepage: string;
|
|
11
|
-
packageManager: string;
|
|
12
|
-
scripts: {
|
|
13
|
-
start: string;
|
|
14
|
-
patch: string;
|
|
15
|
-
minor: string;
|
|
16
|
-
major: string;
|
|
17
|
-
site: string;
|
|
18
|
-
commit: string;
|
|
19
|
-
build: string;
|
|
20
|
-
};
|
|
21
|
-
repository: {
|
|
22
|
-
type: string;
|
|
23
|
-
url: string;
|
|
24
|
-
};
|
|
25
|
-
bugs: {
|
|
26
|
-
url: string;
|
|
27
|
-
};
|
|
28
|
-
dependencies: {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
dumfunctions: string;
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
devDependencies: {
|
|
35
|
-
typescript: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
export default _default;
|
|
1
|
+
declare const _default: {
|
|
2
|
+
name: string;
|
|
3
|
+
version: string;
|
|
4
|
+
type: string;
|
|
5
|
+
description: string;
|
|
6
|
+
main: string;
|
|
7
|
+
keywords: string[];
|
|
8
|
+
author: string;
|
|
9
|
+
license: string;
|
|
10
|
+
homepage: string;
|
|
11
|
+
packageManager: string;
|
|
12
|
+
scripts: {
|
|
13
|
+
start: string;
|
|
14
|
+
patch: string;
|
|
15
|
+
minor: string;
|
|
16
|
+
major: string;
|
|
17
|
+
site: string;
|
|
18
|
+
commit: string;
|
|
19
|
+
build: string;
|
|
20
|
+
};
|
|
21
|
+
repository: {
|
|
22
|
+
type: string;
|
|
23
|
+
url: string;
|
|
24
|
+
};
|
|
25
|
+
bugs: {
|
|
26
|
+
url: string;
|
|
27
|
+
};
|
|
28
|
+
dependencies: {
|
|
29
|
+
'@sapphire/shapeshift': string;
|
|
30
|
+
'discord.js': string;
|
|
31
|
+
dumfunctions: string;
|
|
32
|
+
'xernerx-extension-builder': string;
|
|
33
|
+
};
|
|
34
|
+
devDependencies: {
|
|
35
|
+
typescript: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SlashCommandStringOption,
|
|
3
|
+
SlashCommandNumberOption,
|
|
4
|
+
SlashCommandIntegerOption,
|
|
5
|
+
SlashCommandBooleanOption,
|
|
6
|
+
SlashCommandUserOption,
|
|
7
|
+
SlashCommandChannelOption,
|
|
8
|
+
SlashCommandRoleOption,
|
|
9
|
+
SlashCommandMentionableOption,
|
|
10
|
+
} from 'discord.js';
|
|
11
|
+
export declare enum InhibitorType {
|
|
12
|
+
Member = 'Member',
|
|
13
|
+
User = 'User',
|
|
14
|
+
Guild = 'Guild',
|
|
15
|
+
SlashCommand = 'SlashCommand',
|
|
16
|
+
MessageCommand = 'MessageCommand',
|
|
17
|
+
ContextCommand = 'ContextCommand',
|
|
18
|
+
Command = 'Command',
|
|
19
|
+
Message = 'Message',
|
|
20
|
+
Interaction = 'Interaction',
|
|
21
|
+
Channel = 'Channel',
|
|
22
|
+
}
|
|
23
|
+
export declare enum CommandType {
|
|
24
|
+
Message = 'MessageCommand',
|
|
25
|
+
Slash = 'SlashCommand',
|
|
26
|
+
Context = 'ContextCommand',
|
|
27
|
+
Event = 'Event',
|
|
28
|
+
Inhibitor = 'Inhibitor',
|
|
29
|
+
MessageCommand = 'MessageCommand',
|
|
30
|
+
SlashCommand = 'SlashCommand',
|
|
31
|
+
ContextCommand = 'ContextCommand',
|
|
32
|
+
}
|
|
33
|
+
export declare enum ContextCommandType {
|
|
34
|
+
Message = 3,
|
|
35
|
+
User = 2,
|
|
36
|
+
}
|
|
37
|
+
export declare enum EventEmitterType {
|
|
38
|
+
Client = 'client',
|
|
39
|
+
Rest = 'rest',
|
|
40
|
+
Process = 'process',
|
|
41
|
+
}
|
|
42
|
+
export type SlashCommandOptionChoices = SlashCommandStringOption | SlashCommandNumberOption | SlashCommandIntegerOption;
|
|
43
|
+
export type SlashCommandOption = SlashCommandOptionChoices | SlashCommandBooleanOption | SlashCommandUserOption | SlashCommandChannelOption | SlashCommandRoleOption | SlashCommandMentionableOption;
|
|
44
|
+
export type SlashArgumentTypes = 'String' | 'Number' | 'Boolean' | 'User' | 'Channel' | 'Role' | 'Mentionable' | 'Integer';
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { Collection } from 'discord.js';
|
|
2
|
-
import CommandHandler from '../handlers/CommandHandler.js';
|
|
3
|
-
import EventHandler from '../handlers/EventHandler.js';
|
|
4
|
-
import InhibitorHandler from '../handlers/InhibitorHandler.js';
|
|
5
|
-
import MessageCommandBuilder from '../build/MessageCommandBuilder.js';
|
|
6
|
-
import ContextCommandBuilder from '../build/ContextCommandBuilder.js';
|
|
7
|
-
import SlashCommandBuilder from '../build/SlashCommandBuilder.js';
|
|
8
|
-
export interface ClientCommands {
|
|
9
|
-
message: Collection<string, MessageCommandBuilder>;
|
|
10
|
-
slash: Collection<string, SlashCommandBuilder>;
|
|
11
|
-
context: Collection<string, ContextCommandBuilder>;
|
|
12
|
-
}
|
|
13
|
-
export interface ClientCache {
|
|
14
|
-
messages: Collection<string, object>;
|
|
15
|
-
cooldowns: Collection<string, object>;
|
|
16
|
-
messageCommands: Collection<string, object>;
|
|
17
|
-
slashCommands: Collection<string, object>;
|
|
18
|
-
contextCommands: Collection<string, object>;
|
|
19
|
-
commands: Collection<string, object>;
|
|
20
|
-
}
|
|
21
|
-
export interface ClientModules {
|
|
22
|
-
commandHandler: CommandHandler;
|
|
23
|
-
eventHandler: EventHandler;
|
|
24
|
-
inhibitorHandler: InhibitorHandler;
|
|
25
|
-
}
|
|
1
|
+
import { Collection } from 'discord.js';
|
|
2
|
+
import CommandHandler from '../handlers/CommandHandler.js';
|
|
3
|
+
import EventHandler from '../handlers/EventHandler.js';
|
|
4
|
+
import InhibitorHandler from '../handlers/InhibitorHandler.js';
|
|
5
|
+
import MessageCommandBuilder from '../build/MessageCommandBuilder.js';
|
|
6
|
+
import ContextCommandBuilder from '../build/ContextCommandBuilder.js';
|
|
7
|
+
import SlashCommandBuilder from '../build/SlashCommandBuilder.js';
|
|
8
|
+
export interface ClientCommands {
|
|
9
|
+
message: Collection<string, MessageCommandBuilder>;
|
|
10
|
+
slash: Collection<string, SlashCommandBuilder>;
|
|
11
|
+
context: Collection<string, ContextCommandBuilder>;
|
|
12
|
+
}
|
|
13
|
+
export interface ClientCache {
|
|
14
|
+
messages: Collection<string, object>;
|
|
15
|
+
cooldowns: Collection<string, object>;
|
|
16
|
+
messageCommands: Collection<string, object>;
|
|
17
|
+
slashCommands: Collection<string, object>;
|
|
18
|
+
contextCommands: Collection<string, object>;
|
|
19
|
+
commands: Collection<string, object>;
|
|
20
|
+
}
|
|
21
|
+
export interface ClientModules {
|
|
22
|
+
commandHandler: CommandHandler;
|
|
23
|
+
eventHandler: EventHandler;
|
|
24
|
+
inhibitorHandler: InhibitorHandler;
|
|
25
|
+
}
|
|
@@ -1,206 +1,241 @@
|
|
|
1
|
-
import { CacheFactory, ChannelType, ContextMenuCommandType, MessageMentionOptions, Partials, PresenceData, RESTOptions, SweeperOptions, WebSocketOptions } from 'discord.js';
|
|
2
|
-
import XernerxExtensionBuilder from 'xernerx-extension-builder';
|
|
3
|
-
import {
|
|
4
|
-
import { MessageCommandArgsTypes } from './types.js';
|
|
5
|
-
export interface DiscordOptions {
|
|
6
|
-
shards?: number | number[] | 'auto';
|
|
7
|
-
closeTimeout?: number;
|
|
8
|
-
shardCount?: number;
|
|
9
|
-
makeCache?: CacheFactory;
|
|
10
|
-
allowedMentions?: MessageMentionOptions;
|
|
11
|
-
partials?: Array<Partials>;
|
|
12
|
-
failIfNotExists?: boolean;
|
|
13
|
-
presence?: PresenceData;
|
|
14
|
-
intents: number[];
|
|
15
|
-
waitGuildTimeout?: number;
|
|
16
|
-
sweepers?: SweeperOptions;
|
|
17
|
-
ws?: WebSocketOptions;
|
|
18
|
-
rest?: RESTOptions;
|
|
19
|
-
jsonTransformer?: (obj: unknown) => unknown;
|
|
20
|
-
}
|
|
21
|
-
export interface ClientOptions {
|
|
22
|
-
ownerId?: string | string[];
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
export interface
|
|
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
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
1
|
+
import { CacheFactory, ChannelType, ContextMenuCommandType, MessageMentionOptions, Partials, PresenceData, RESTOptions, SweeperOptions, WebSocketOptions } from 'discord.js';
|
|
2
|
+
import XernerxExtensionBuilder from 'xernerx-extension-builder';
|
|
3
|
+
import { InhibitorType } from './enums.js';
|
|
4
|
+
import { EventEmitterType, Localizations, MessageCommandArgsTypes } from './types.js';
|
|
5
|
+
export interface DiscordOptions {
|
|
6
|
+
shards?: number | number[] | 'auto';
|
|
7
|
+
closeTimeout?: number;
|
|
8
|
+
shardCount?: number;
|
|
9
|
+
makeCache?: CacheFactory;
|
|
10
|
+
allowedMentions?: MessageMentionOptions;
|
|
11
|
+
partials?: Array<Partials>;
|
|
12
|
+
failIfNotExists?: boolean;
|
|
13
|
+
presence?: PresenceData;
|
|
14
|
+
intents: number[];
|
|
15
|
+
waitGuildTimeout?: number;
|
|
16
|
+
sweepers?: SweeperOptions;
|
|
17
|
+
ws?: WebSocketOptions;
|
|
18
|
+
rest?: RESTOptions;
|
|
19
|
+
jsonTransformer?: (obj: unknown) => unknown;
|
|
20
|
+
}
|
|
21
|
+
export interface ClientOptions {
|
|
22
|
+
ownerId?: string | string[];
|
|
23
|
+
permissions?: {
|
|
24
|
+
client?: Array<string>;
|
|
25
|
+
user?: Array<string>;
|
|
26
|
+
dm?: boolean;
|
|
27
|
+
};
|
|
28
|
+
ignore?: {
|
|
29
|
+
owner?: boolean;
|
|
30
|
+
users: Array<string>;
|
|
31
|
+
channels: Array<string>;
|
|
32
|
+
guilds: Array<string>;
|
|
33
|
+
};
|
|
34
|
+
log?: {
|
|
35
|
+
ready: boolean;
|
|
36
|
+
error: boolean;
|
|
37
|
+
};
|
|
38
|
+
cooldown?: {
|
|
39
|
+
command?: number;
|
|
40
|
+
cache?: number;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface HandlerOptions {
|
|
44
|
+
message?: MessageCommandHandlerOptions;
|
|
45
|
+
slash?: SlashCommandHandlerOptions;
|
|
46
|
+
context?: ContextCommandHandlerOptions;
|
|
47
|
+
events?: EventHandlerOptions;
|
|
48
|
+
inhibitors?: InhibitorHandlerOptions;
|
|
49
|
+
}
|
|
50
|
+
export interface ExtensionOptions {
|
|
51
|
+
extensions: Array<XernerxExtensionBuilder>;
|
|
52
|
+
logging?: boolean;
|
|
53
|
+
}
|
|
54
|
+
export interface MessageCommandOptions {
|
|
55
|
+
name: string;
|
|
56
|
+
aliases?: Array<string>;
|
|
57
|
+
separator?: string;
|
|
58
|
+
description?: string;
|
|
59
|
+
info?: string;
|
|
60
|
+
category?: string;
|
|
61
|
+
prefix?: Array<string> | string;
|
|
62
|
+
regex?: string;
|
|
63
|
+
channelType?: Array<number>;
|
|
64
|
+
cooldown?: number;
|
|
65
|
+
ignore?: {
|
|
66
|
+
owner?: boolean;
|
|
67
|
+
users?: Array<string>;
|
|
68
|
+
channels?: Array<string>;
|
|
69
|
+
guilds?: Array<string>;
|
|
70
|
+
};
|
|
71
|
+
strict?: {
|
|
72
|
+
owner?: boolean;
|
|
73
|
+
users?: Array<string>;
|
|
74
|
+
channels?: Array<string>;
|
|
75
|
+
guilds?: Array<string>;
|
|
76
|
+
};
|
|
77
|
+
permissions?: {
|
|
78
|
+
client?: Array<string>;
|
|
79
|
+
user?: Array<string>;
|
|
80
|
+
dm?: boolean;
|
|
81
|
+
};
|
|
82
|
+
args?: Array<MessageArgumentOptions>;
|
|
83
|
+
}
|
|
84
|
+
export interface ContextCommandOptions {
|
|
85
|
+
name: string;
|
|
86
|
+
type: ContextMenuCommandType;
|
|
87
|
+
nameLocalizations: Record<Localizations, string>;
|
|
88
|
+
description?: string;
|
|
89
|
+
info?: string;
|
|
90
|
+
category?: string;
|
|
91
|
+
channelType?: Array<number> | number;
|
|
92
|
+
cooldown?: number;
|
|
93
|
+
ignore?: {
|
|
94
|
+
owner?: boolean;
|
|
95
|
+
users?: Array<string>;
|
|
96
|
+
channels?: Array<string>;
|
|
97
|
+
guilds?: Array<string>;
|
|
98
|
+
};
|
|
99
|
+
strict?: {
|
|
100
|
+
owner?: boolean;
|
|
101
|
+
users?: Array<string>;
|
|
102
|
+
channels?: Array<string>;
|
|
103
|
+
guilds?: Array<string>;
|
|
104
|
+
};
|
|
105
|
+
permissions?: {
|
|
106
|
+
client?: Array<string>;
|
|
107
|
+
users?: Array<string>;
|
|
108
|
+
dm?: boolean;
|
|
109
|
+
};
|
|
110
|
+
defer?: {
|
|
111
|
+
reply?: boolean;
|
|
112
|
+
ephemeral?: boolean;
|
|
113
|
+
fetch?: boolean;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export interface MessageArgumentOptions {
|
|
117
|
+
type: MessageCommandArgsTypes;
|
|
118
|
+
content?: Array<string>;
|
|
119
|
+
match?: string;
|
|
120
|
+
name: string;
|
|
121
|
+
prompt?: {
|
|
122
|
+
reply: string;
|
|
123
|
+
send: string;
|
|
124
|
+
};
|
|
125
|
+
default?: string | Function;
|
|
126
|
+
}
|
|
127
|
+
export interface SlashArgumentOptions {
|
|
128
|
+
type: 'string' | 'number' | 'boolean' | 'user' | 'channel' | 'role' | 'mentionable' | 'integer';
|
|
129
|
+
name: string;
|
|
130
|
+
choices: Array<{
|
|
131
|
+
name: string;
|
|
132
|
+
value: string;
|
|
133
|
+
}>;
|
|
134
|
+
required: boolean;
|
|
135
|
+
description: string;
|
|
136
|
+
}
|
|
137
|
+
export interface SlashSubcommandOptions {
|
|
138
|
+
name: string;
|
|
139
|
+
description: string;
|
|
140
|
+
args: Array<SlashArgumentOptions>;
|
|
141
|
+
}
|
|
142
|
+
export interface SlashGroupOptions {
|
|
143
|
+
name: string;
|
|
144
|
+
description: string;
|
|
145
|
+
subcommands: Array<SlashSubcommandOptions>;
|
|
146
|
+
}
|
|
147
|
+
export interface SlashCommandOptions {
|
|
148
|
+
name: string;
|
|
149
|
+
description: string;
|
|
150
|
+
info?: string;
|
|
151
|
+
category?: string;
|
|
152
|
+
owner?: boolean;
|
|
153
|
+
channelType?: ChannelType;
|
|
154
|
+
cooldown?: number;
|
|
155
|
+
ignore?: {
|
|
156
|
+
owner?: boolean;
|
|
157
|
+
users?: Array<string>;
|
|
158
|
+
channels?: Array<string>;
|
|
159
|
+
guilds?: Array<string>;
|
|
160
|
+
};
|
|
161
|
+
strict?: {
|
|
162
|
+
owner?: boolean;
|
|
163
|
+
users?: Array<string>;
|
|
164
|
+
channels?: Array<string>;
|
|
165
|
+
guilds?: Array<string>;
|
|
166
|
+
};
|
|
167
|
+
permissions: {
|
|
168
|
+
client?: Array<string>;
|
|
169
|
+
users?: Array<string>;
|
|
170
|
+
dm?: boolean;
|
|
171
|
+
};
|
|
172
|
+
defer?: {
|
|
173
|
+
reply?: boolean;
|
|
174
|
+
ephemeral?: boolean;
|
|
175
|
+
fetchReply?: boolean;
|
|
176
|
+
};
|
|
177
|
+
args?: Array<SlashArgumentOptions>;
|
|
178
|
+
subcommands?: Array<SlashSubcommandOptions>;
|
|
179
|
+
groups?: Array<SlashGroupOptions>;
|
|
180
|
+
}
|
|
181
|
+
export interface MessageCommandHandlerOptions {
|
|
182
|
+
directory: string;
|
|
183
|
+
prefix: string[] | string;
|
|
184
|
+
allowMention?: boolean;
|
|
185
|
+
cooldown?: number;
|
|
186
|
+
userPermissions?: bigint[];
|
|
187
|
+
clientPermissions?: bigint[];
|
|
188
|
+
handleEdits?: boolean;
|
|
189
|
+
handleDeletes?: boolean;
|
|
190
|
+
handleTyping?: boolean;
|
|
191
|
+
util?: boolean;
|
|
192
|
+
logging?: boolean;
|
|
193
|
+
}
|
|
194
|
+
export interface SlashCommandHandlerOptions {
|
|
195
|
+
directory: string;
|
|
196
|
+
guildId: string;
|
|
197
|
+
global: boolean;
|
|
198
|
+
cooldown?: number;
|
|
199
|
+
userPermissions?: bigint[];
|
|
200
|
+
clientPermissions?: bigint[];
|
|
201
|
+
util?: boolean;
|
|
202
|
+
logging?: boolean;
|
|
203
|
+
defer?: {
|
|
204
|
+
reply?: boolean;
|
|
205
|
+
ephemeral?: boolean;
|
|
206
|
+
fetchReply?: boolean;
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
export interface ContextCommandHandlerOptions {
|
|
210
|
+
directory: string;
|
|
211
|
+
guildId: string;
|
|
212
|
+
global: boolean;
|
|
213
|
+
cooldown?: number;
|
|
214
|
+
userPermissions?: bigint[];
|
|
215
|
+
clientPermissions?: bigint[];
|
|
216
|
+
util?: boolean;
|
|
217
|
+
logging?: boolean;
|
|
218
|
+
defer?: {
|
|
219
|
+
reply?: boolean;
|
|
220
|
+
ephemeral?: boolean;
|
|
221
|
+
fetchReply?: boolean;
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
export interface EventHandlerOptions {
|
|
225
|
+
directory: string;
|
|
226
|
+
logging?: boolean;
|
|
227
|
+
}
|
|
228
|
+
export interface EventOptions {
|
|
229
|
+
name: string;
|
|
230
|
+
emitter?: EventEmitterType | string;
|
|
231
|
+
type?: 'discord' | string;
|
|
232
|
+
once?: boolean;
|
|
233
|
+
}
|
|
234
|
+
export interface InhibitorHandlerOptions {
|
|
235
|
+
directory: string;
|
|
236
|
+
logging?: boolean;
|
|
237
|
+
}
|
|
238
|
+
export interface InhibitorOptions {
|
|
239
|
+
name: string;
|
|
240
|
+
type: InhibitorType;
|
|
241
|
+
}
|