reciple 6.0.4 → 7.0.0-dev.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/LICENSE +674 -674
- package/bin/bin.d.mts +2 -0
- package/bin/bin.mjs +73 -0
- package/bin/bin.mjs.map +1 -0
- package/bin/classes/Config.d.ts +32 -0
- package/bin/classes/Config.js +72 -0
- package/bin/classes/Config.js.map +1 -0
- package/bin/esm.d.mts +1 -0
- package/{dist/lib → bin}/esm.mjs +0 -0
- package/bin/esm.mjs.map +1 -0
- package/bin/index.d.ts +5 -0
- package/bin/index.js +22 -0
- package/bin/index.js.map +1 -0
- package/bin/utils/cli.d.ts +4 -0
- package/bin/utils/cli.js +20 -0
- package/bin/utils/cli.js.map +1 -0
- package/bin/utils/logger.d.ts +6 -0
- package/bin/utils/logger.js +61 -0
- package/bin/utils/logger.js.map +1 -0
- package/bin/utils/modules.d.ts +3 -0
- package/bin/utils/modules.js +35 -0
- package/bin/utils/modules.js.map +1 -0
- package/package.json +25 -67
- package/static/config.yml +97 -0
- package/README.md +0 -182
- package/dist/lib/bin.mjs +0 -77
- package/dist/lib/bin.mjs.map +0 -1
- package/dist/lib/esm.mjs.map +0 -1
- package/dist/lib/index.js +0 -34
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/reciple/classes/RecipleClient.js +0 -293
- package/dist/lib/reciple/classes/RecipleClient.js.map +0 -1
- package/dist/lib/reciple/classes/RecipleConfig.js +0 -107
- package/dist/lib/reciple/classes/RecipleConfig.js.map +0 -1
- package/dist/lib/reciple/classes/RecipleModule.js +0 -137
- package/dist/lib/reciple/classes/RecipleModule.js.map +0 -1
- package/dist/lib/reciple/classes/builders/MessageCommandBuilder.js +0 -316
- package/dist/lib/reciple/classes/builders/MessageCommandBuilder.js.map +0 -1
- package/dist/lib/reciple/classes/builders/MessageCommandOptionBuilder.js +0 -127
- package/dist/lib/reciple/classes/builders/MessageCommandOptionBuilder.js.map +0 -1
- package/dist/lib/reciple/classes/builders/SlashCommandBuilder.js +0 -253
- package/dist/lib/reciple/classes/builders/SlashCommandBuilder.js.map +0 -1
- package/dist/lib/reciple/classes/managers/ApplicationCommandManager.js +0 -179
- package/dist/lib/reciple/classes/managers/ApplicationCommandManager.js.map +0 -1
- package/dist/lib/reciple/classes/managers/CommandCooldownManager.js +0 -100
- package/dist/lib/reciple/classes/managers/CommandCooldownManager.js.map +0 -1
- package/dist/lib/reciple/classes/managers/CommandManager.js +0 -65
- package/dist/lib/reciple/classes/managers/CommandManager.js.map +0 -1
- package/dist/lib/reciple/classes/managers/MessageCommandOptionManager.js +0 -26
- package/dist/lib/reciple/classes/managers/MessageCommandOptionManager.js.map +0 -1
- package/dist/lib/reciple/classes/managers/ModuleManager.js +0 -181
- package/dist/lib/reciple/classes/managers/ModuleManager.js.map +0 -1
- package/dist/lib/reciple/flags.js +0 -32
- package/dist/lib/reciple/flags.js.map +0 -1
- package/dist/lib/reciple/permissions.js +0 -31
- package/dist/lib/reciple/permissions.js.map +0 -1
- package/dist/lib/reciple/types/builders.js +0 -12
- package/dist/lib/reciple/types/builders.js.map +0 -1
- package/dist/lib/reciple/types/commands.js +0 -16
- package/dist/lib/reciple/types/commands.js.map +0 -1
- package/dist/lib/reciple/types/paramOptions.js +0 -3
- package/dist/lib/reciple/types/paramOptions.js.map +0 -1
- package/dist/lib/reciple/util.js +0 -72
- package/dist/lib/reciple/util.js.map +0 -1
- package/dist/lib/reciple/version.js +0 -48
- package/dist/lib/reciple/version.js.map +0 -1
- package/dist/types/bin.d.mts +0 -3
- package/dist/types/bin.d.mts.map +0 -1
- package/dist/types/esm.d.mts +0 -2
- package/dist/types/esm.d.mts.map +0 -1
- package/dist/types/index.d.ts +0 -18
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/reciple/classes/RecipleClient.d.ts +0 -116
- package/dist/types/reciple/classes/RecipleClient.d.ts.map +0 -1
- package/dist/types/reciple/classes/RecipleConfig.d.ts +0 -102
- package/dist/types/reciple/classes/RecipleConfig.d.ts.map +0 -1
- package/dist/types/reciple/classes/RecipleModule.d.ts +0 -88
- package/dist/types/reciple/classes/RecipleModule.d.ts.map +0 -1
- package/dist/types/reciple/classes/builders/MessageCommandBuilder.d.ts +0 -198
- package/dist/types/reciple/classes/builders/MessageCommandBuilder.d.ts.map +0 -1
- package/dist/types/reciple/classes/builders/MessageCommandOptionBuilder.d.ts +0 -54
- package/dist/types/reciple/classes/builders/MessageCommandOptionBuilder.d.ts.map +0 -1
- package/dist/types/reciple/classes/builders/SlashCommandBuilder.d.ts +0 -107
- package/dist/types/reciple/classes/builders/SlashCommandBuilder.d.ts.map +0 -1
- package/dist/types/reciple/classes/managers/ApplicationCommandManager.d.ts +0 -54
- package/dist/types/reciple/classes/managers/ApplicationCommandManager.d.ts.map +0 -1
- package/dist/types/reciple/classes/managers/CommandCooldownManager.d.ts +0 -71
- package/dist/types/reciple/classes/managers/CommandCooldownManager.d.ts.map +0 -1
- package/dist/types/reciple/classes/managers/CommandManager.d.ts +0 -35
- package/dist/types/reciple/classes/managers/CommandManager.d.ts.map +0 -1
- package/dist/types/reciple/classes/managers/MessageCommandOptionManager.d.ts +0 -23
- package/dist/types/reciple/classes/managers/MessageCommandOptionManager.d.ts.map +0 -1
- package/dist/types/reciple/classes/managers/ModuleManager.d.ts +0 -50
- package/dist/types/reciple/classes/managers/ModuleManager.d.ts.map +0 -1
- package/dist/types/reciple/flags.d.ts +0 -18
- package/dist/types/reciple/flags.d.ts.map +0 -1
- package/dist/types/reciple/permissions.d.ts +0 -16
- package/dist/types/reciple/permissions.d.ts.map +0 -1
- package/dist/types/reciple/types/builders.d.ts +0 -206
- package/dist/types/reciple/types/builders.d.ts.map +0 -1
- package/dist/types/reciple/types/commands.d.ts +0 -86
- package/dist/types/reciple/types/commands.d.ts.map +0 -1
- package/dist/types/reciple/types/paramOptions.d.ts +0 -102
- package/dist/types/reciple/types/paramOptions.d.ts.map +0 -1
- package/dist/types/reciple/util.d.ts +0 -27
- package/dist/types/reciple/util.d.ts.map +0 -1
- package/dist/types/reciple/version.d.ts +0 -26
- package/dist/types/reciple/version.d.ts.map +0 -1
- package/resource/reciple.yml +0 -122
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
import { SlashCommandBuilder, SlashCommandExecuteData, SlashCommandExecuteFunction, SlashCommandHaltData, SlashCommandHaltFunction, SlashCommandOptionsOnlyBuilder, SlashCommandSubcommandsOnlyBuilder } from '../classes/builders/SlashCommandBuilder';
|
|
2
|
-
import { MessageCommandBuilder, MessageCommandExecuteData, MessageCommandExecuteFunction, MessageCommandHaltData, MessageCommandHaltFunction } from '../classes/builders/MessageCommandBuilder';
|
|
3
|
-
import { MessageCommandOptionBuilder } from '../classes/builders/MessageCommandOptionBuilder';
|
|
4
|
-
import { ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionType, Awaitable, LocalizationMap, PermissionResolvable, RestOrArray, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, SlashCommandUserOption } from 'discord.js';
|
|
5
|
-
/**
|
|
6
|
-
* Any command builders
|
|
7
|
-
*/
|
|
8
|
-
export type AnyCommandBuilder<T = unknown> = AnySlashCommandBuilder<T> | MessageCommandBuilder<T>;
|
|
9
|
-
/**
|
|
10
|
-
* Any command data
|
|
11
|
-
*/
|
|
12
|
-
export type AnyCommandData<T = unknown> = SlashCommandData<T> | MessageCommandData<T>;
|
|
13
|
-
/**
|
|
14
|
-
* Any slash command builders
|
|
15
|
-
*/
|
|
16
|
-
export type AnySlashCommandBuilder<T = unknown> = SlashCommandBuilder<T> | SlashCommandOptionsOnlyBuilder<T> | SlashCommandSubcommandsOnlyBuilder<T>;
|
|
17
|
-
/**
|
|
18
|
-
* Any command halt functions
|
|
19
|
-
*/
|
|
20
|
-
export type AnyCommandHaltFunction<T = unknown> = SlashCommandHaltFunction<T> | MessageCommandHaltFunction<T>;
|
|
21
|
-
/**
|
|
22
|
-
* Any command execute function
|
|
23
|
-
*/
|
|
24
|
-
export type AnyCommandExecuteFunction<T = unknown> = SlashCommandExecuteFunction<T> | MessageCommandExecuteFunction<T>;
|
|
25
|
-
/**
|
|
26
|
-
* Command halt function
|
|
27
|
-
*/
|
|
28
|
-
export type CommandHaltFunction<T extends CommandType, M = unknown> = (haltData: T extends CommandType.SlashCommand ? SlashCommandHaltData<M> : T extends CommandType.MessageCommand ? MessageCommandHaltData<M> : SlashCommandHaltData<M> | MessageCommandHaltData<M>) => Awaitable<boolean | null | undefined | void>;
|
|
29
|
-
/**
|
|
30
|
-
* Command execute function
|
|
31
|
-
*/
|
|
32
|
-
export type CommandExecuteFunction<T extends CommandType, M = unknown> = (executeData: T extends CommandType.SlashCommand ? SlashCommandExecuteData<M> : T extends CommandType.MessageCommand ? MessageCommandExecuteData<M> : SlashCommandExecuteData<M> | MessageCommandExecuteData<M>) => Awaitable<void>;
|
|
33
|
-
/**
|
|
34
|
-
* Slash command options resolvable
|
|
35
|
-
*/
|
|
36
|
-
export type SlashCommandResolvable<T = unknown, OptionsOnly = unknown> = OptionsOnly extends true ? SlashCommandOptionsOnlyBuilder<T> : OptionsOnly extends false ? SlashCommandSubcommandsOnlyBuilder<T> : AnySlashCommandBuilder<T> | SlashCommandData<T>;
|
|
37
|
-
/**
|
|
38
|
-
* Message command resolvable
|
|
39
|
-
*/
|
|
40
|
-
export type MessageCommandResolvable<T = unknown> = MessageCommandBuilder<T> | MessageCommandData<T>;
|
|
41
|
-
/**
|
|
42
|
-
* Message command option resolvable
|
|
43
|
-
*/
|
|
44
|
-
export type MessageCommandOptionResolvable = MessageCommandOptionBuilder | MessageCommandOptionData;
|
|
45
|
-
/**
|
|
46
|
-
* Slash command options
|
|
47
|
-
*/
|
|
48
|
-
export type AnySlashCommandOptionData = AnySlashCommandOptionsOnlyOptionData | SlashCommandSubCommandGroupData | SlashCommandSubCommandData;
|
|
49
|
-
/**
|
|
50
|
-
* Slash command options builders
|
|
51
|
-
*/
|
|
52
|
-
export type AnySlashCommandOptionBuilder = AnySlashCommandOptionsOnlyOptionBuilder | SlashCommandSubcommandGroupBuilder | SlashCommandSubcommandBuilder;
|
|
53
|
-
/**
|
|
54
|
-
* Slash command options without sub commands
|
|
55
|
-
*/
|
|
56
|
-
export type AnySlashCommandOptionsOnlyOptionData = SlashCommandAttachmentOptionData | SlashCommandBooleanOptionData | SlashCommandChannelOptionData | SlashCommandIntegerOptionData | SlashCommandMentionableOptionData | SlashCommandNumberOptionData | SlashCommandRoleOptionData | SlashCommandStringOptionData | SlashCommandUserOptionData;
|
|
57
|
-
/**
|
|
58
|
-
* Slash command option builder without sub commands
|
|
59
|
-
*/
|
|
60
|
-
export type AnySlashCommandOptionsOnlyOptionBuilder = SlashCommandAttachmentOption | SlashCommandBooleanOption | SlashCommandChannelOption | SlashCommandIntegerOption | SlashCommandMentionableOption | SlashCommandNumberOption | SlashCommandRoleOption | SlashCommandStringOption | SlashCommandUserOption;
|
|
61
|
-
/**
|
|
62
|
-
* Types of command builders
|
|
63
|
-
*/
|
|
64
|
-
export declare enum CommandType {
|
|
65
|
-
SlashCommand = 1,
|
|
66
|
-
MessageCommand = 2
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Shared command builder methods and properties
|
|
70
|
-
*/
|
|
71
|
-
export interface SharedCommandBuilderProperties<T = unknown> {
|
|
72
|
-
readonly type: CommandType;
|
|
73
|
-
cooldown: number;
|
|
74
|
-
requiredBotPermissions: PermissionResolvable[];
|
|
75
|
-
requiredMemberPermissions: PermissionResolvable[];
|
|
76
|
-
halt?: AnyCommandHaltFunction<T>;
|
|
77
|
-
execute: AnyCommandExecuteFunction<T>;
|
|
78
|
-
metadata?: T;
|
|
79
|
-
/**
|
|
80
|
-
* Sets the execute cooldown for this command.
|
|
81
|
-
* - `0` means no cooldown
|
|
82
|
-
* @param cooldown Command cooldown in milliseconds
|
|
83
|
-
*/
|
|
84
|
-
setCooldown(cooldown: number): this;
|
|
85
|
-
/**
|
|
86
|
-
* Set required bot permissions to execute the command
|
|
87
|
-
* @param permissions Bot's required permissions
|
|
88
|
-
*/
|
|
89
|
-
setRequiredBotPermissions(...permissions: RestOrArray<PermissionResolvable>): this;
|
|
90
|
-
/**
|
|
91
|
-
* Set required permissions to execute the command
|
|
92
|
-
* @param permissions User's return permissions
|
|
93
|
-
*/
|
|
94
|
-
setRequiredMemberPermissions(...permissions: RestOrArray<PermissionResolvable>): this;
|
|
95
|
-
/**
|
|
96
|
-
* Function when the command is interupted
|
|
97
|
-
* @param halt Function to execute when command is halted
|
|
98
|
-
*/
|
|
99
|
-
setHalt(halt?: this['halt']): this;
|
|
100
|
-
/**
|
|
101
|
-
* Function when the command is executed
|
|
102
|
-
* @param execute Function to execute when the command is called
|
|
103
|
-
*/
|
|
104
|
-
setExecute(execute: this['execute']): this;
|
|
105
|
-
/**
|
|
106
|
-
* Set a command metadata
|
|
107
|
-
* @param metadata Command metadata
|
|
108
|
-
*/
|
|
109
|
-
setMetadata(metadata?: T): this;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Shared command name and description properties
|
|
113
|
-
*/
|
|
114
|
-
export interface SharedCommandDataProperties {
|
|
115
|
-
name: string;
|
|
116
|
-
description: string;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Slash command object data interface
|
|
120
|
-
*/
|
|
121
|
-
export interface SlashCommandData<T = unknown> extends SharedCommandDataProperties, Partial<Omit<SharedCommandBuilderProperties<T>, 'setCooldown' | 'setRequiredBotPermissions' | 'setRequiredMemberPermissions' | 'setHalt' | 'setExecute' | 'setMetadata' | 'halt' | 'execute'>> {
|
|
122
|
-
type: CommandType.SlashCommand;
|
|
123
|
-
nameLocalizations?: LocalizationMap;
|
|
124
|
-
descriptionLocalizations?: LocalizationMap;
|
|
125
|
-
options?: (AnySlashCommandOptionData | AnySlashCommandOptionBuilder)[];
|
|
126
|
-
/**
|
|
127
|
-
* @deprecated This property is deprecated and will be removed in the future.
|
|
128
|
-
*/
|
|
129
|
-
defaultPermission?: boolean;
|
|
130
|
-
defaultMemberPermissions?: string | null;
|
|
131
|
-
dmPermission?: boolean;
|
|
132
|
-
halt?: SlashCommandHaltFunction<T>;
|
|
133
|
-
execute: SlashCommandExecuteFunction<T>;
|
|
134
|
-
}
|
|
135
|
-
export interface SharedSlashCommandOptionData<V = string | number> extends SharedCommandDataProperties, Pick<SlashCommandData, 'nameLocalizations' | 'descriptionLocalizations'> {
|
|
136
|
-
choices?: {
|
|
137
|
-
name: string;
|
|
138
|
-
nameLocalizations?: LocalizationMap;
|
|
139
|
-
value: V;
|
|
140
|
-
}[];
|
|
141
|
-
autocomplete?: boolean;
|
|
142
|
-
required?: boolean;
|
|
143
|
-
}
|
|
144
|
-
export interface SlashCommandAttachmentOptionData extends Omit<SharedSlashCommandOptionData, 'choices' | 'autocomplete'> {
|
|
145
|
-
type: ApplicationCommandOptionType.Attachment;
|
|
146
|
-
}
|
|
147
|
-
export interface SlashCommandBooleanOptionData extends Omit<SharedSlashCommandOptionData, 'choices' | 'autocomplete'> {
|
|
148
|
-
type: ApplicationCommandOptionType.Boolean;
|
|
149
|
-
}
|
|
150
|
-
export interface SlashCommandChannelOptionData extends Omit<SharedSlashCommandOptionData, 'choices' | 'autocomplete'> {
|
|
151
|
-
type: ApplicationCommandOptionType.Channel;
|
|
152
|
-
channelTypes?: ApplicationCommandOptionAllowedChannelTypes[];
|
|
153
|
-
}
|
|
154
|
-
export interface SlashCommandIntegerOptionData extends SharedSlashCommandOptionData<number> {
|
|
155
|
-
type: ApplicationCommandOptionType.Integer;
|
|
156
|
-
minValue?: number;
|
|
157
|
-
maxValue?: number;
|
|
158
|
-
}
|
|
159
|
-
export interface SlashCommandMentionableOptionData extends Omit<SharedSlashCommandOptionData, 'choices' | 'autocomplete'> {
|
|
160
|
-
type: ApplicationCommandOptionType.Mentionable;
|
|
161
|
-
}
|
|
162
|
-
export interface SlashCommandNumberOptionData extends SharedSlashCommandOptionData<number> {
|
|
163
|
-
type: ApplicationCommandOptionType.Number;
|
|
164
|
-
minValue?: number;
|
|
165
|
-
maxValue?: number;
|
|
166
|
-
}
|
|
167
|
-
export interface SlashCommandRoleOptionData extends Omit<SharedSlashCommandOptionData, 'choices' | 'autocomplete'> {
|
|
168
|
-
type: ApplicationCommandOptionType.Role;
|
|
169
|
-
}
|
|
170
|
-
export interface SlashCommandStringOptionData extends SharedSlashCommandOptionData<string> {
|
|
171
|
-
type: ApplicationCommandOptionType.String;
|
|
172
|
-
minLength?: number;
|
|
173
|
-
maxLength?: number;
|
|
174
|
-
}
|
|
175
|
-
export interface SlashCommandUserOptionData extends Omit<SharedSlashCommandOptionData, 'choices' | 'autocomplete'> {
|
|
176
|
-
type: ApplicationCommandOptionType.User;
|
|
177
|
-
}
|
|
178
|
-
export interface SlashCommandSubCommandData extends SharedCommandDataProperties, Pick<SlashCommandData, 'nameLocalizations' | 'descriptionLocalizations'> {
|
|
179
|
-
type: ApplicationCommandOptionType.Subcommand;
|
|
180
|
-
options: (AnySlashCommandOptionsOnlyOptionData | AnySlashCommandOptionsOnlyOptionBuilder)[];
|
|
181
|
-
}
|
|
182
|
-
export interface SlashCommandSubCommandGroupData extends SharedCommandDataProperties, Pick<SlashCommandData, 'nameLocalizations' | 'descriptionLocalizations'> {
|
|
183
|
-
type: ApplicationCommandOptionType.SubcommandGroup;
|
|
184
|
-
options: (SlashCommandSubCommandData | SlashCommandSubcommandBuilder)[];
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Message command object data interface
|
|
188
|
-
*/
|
|
189
|
-
export interface MessageCommandData<T = unknown> extends SharedCommandDataProperties, Partial<Omit<SharedCommandBuilderProperties<T>, 'setCooldown' | 'setRequiredBotPermissions' | 'setRequiredMemberPermissions' | 'setHalt' | 'setExecute' | 'setMetadata' | 'halt' | 'execute'>> {
|
|
190
|
-
type: CommandType.MessageCommand;
|
|
191
|
-
aliases?: string[];
|
|
192
|
-
validateOptions?: boolean;
|
|
193
|
-
allowExecuteInDM?: boolean;
|
|
194
|
-
allowExecuteByBots?: boolean;
|
|
195
|
-
halt?: MessageCommandHaltFunction<T>;
|
|
196
|
-
execute: MessageCommandExecuteFunction<T>;
|
|
197
|
-
options?: MessageCommandOptionResolvable[];
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Message command option object data interface
|
|
201
|
-
*/
|
|
202
|
-
export interface MessageCommandOptionData extends SharedCommandDataProperties {
|
|
203
|
-
required?: boolean;
|
|
204
|
-
validator?: (value: string) => Awaitable<boolean>;
|
|
205
|
-
}
|
|
206
|
-
//# sourceMappingURL=builders.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../../../src/reciple/types/builders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AACxP,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAChM,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC;AAE9F,OAAO,EACH,2CAA2C,EAC3C,4BAA4B,EAC5B,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,WAAW,EACX,4BAA4B,EAC5B,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EACzB,6BAA6B,EAC7B,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,6BAA6B,EAC7B,kCAAkC,EAClC,sBAAsB,EACzB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,OAAO,IAAI,sBAAsB,CAAC,C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2B,EAAE,IAAI,CAAC,gBAAgB,EAAE,mBAAmB,GAAG,0BAA0B,CAAC;IAC1J,IAAI,EAAE,4BAA4B,CAAC,eAAe,CAAC;IACnD,OAAO,EAAE,CAAC,0BAA0B,GAAG,6BAA6B,CAAC,EAAE,CAAC;CAC3E;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,2BAA2B,EAAE,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC,EAAE,aAAa,GAAG,2BAA2B,GAAG,8BAA8B,GAAG,SAAS,GAAG,YAAY,GAAG,aAAa,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;IAChR,IAAI,EAAE,WAAW,CAAC,cAAc,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,IAAI,CAAC,EAAE,0BAA0B,CAAC,CAAC,CAAC,CAAC;IACrC,OAAO,EAAE,6BAA6B,CAAC,CAAC,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,8BAA8B,EAAE,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,2BAA2B;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC,OAAO,CAAC,CAAC;CACrD"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { MessageCommandExecuteData, MessageCommandHaltData } from '../classes/builders/MessageCommandBuilder';
|
|
2
|
-
import { SlashCommandExecuteData, SlashCommandHaltData } from '../classes/builders/SlashCommandBuilder';
|
|
3
|
-
import { MessageCommandOptionManager } from '../classes/managers/MessageCommandOptionManager';
|
|
4
|
-
import { CooledDownUser } from '../classes/managers/CommandCooldownManager';
|
|
5
|
-
import { RecipleClient } from '../classes/RecipleClient';
|
|
6
|
-
import { CommandType } from '../types/builders';
|
|
7
|
-
/**
|
|
8
|
-
* Any command halt data
|
|
9
|
-
*/
|
|
10
|
-
export type AnyCommandHaltData<T = unknown> = SlashCommandHaltData<T> | MessageCommandHaltData<T>;
|
|
11
|
-
/**
|
|
12
|
-
* command halt data
|
|
13
|
-
*/
|
|
14
|
-
export type CommandHaltData<T extends CommandType, M = unknown> = CommandErrorHaltData<T, M> | CommandCooldownHaltData<T, M> | (T extends CommandType.SlashCommand ? never : CommandInvalidArgumentsHaltData<T, M> | CommandMissingArgumentsHaltData<T, M>) | CommandMissingMemberPermissionsHaltData<T, M> | CommandMissingBotPermissionsHaltData<T, M>;
|
|
15
|
-
/**
|
|
16
|
-
* Any command execute data
|
|
17
|
-
*/
|
|
18
|
-
export type AnyCommandExecuteData<T = unknown> = SlashCommandExecuteData<T> | MessageCommandExecuteData<T>;
|
|
19
|
-
/**
|
|
20
|
-
* Command execute data
|
|
21
|
-
*/
|
|
22
|
-
export interface BaseCommandExecuteData {
|
|
23
|
-
/**
|
|
24
|
-
* Command type
|
|
25
|
-
*/
|
|
26
|
-
type: CommandType;
|
|
27
|
-
/**
|
|
28
|
-
* Bot client
|
|
29
|
-
*/
|
|
30
|
-
client: RecipleClient<true>;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Command halt reason base
|
|
34
|
-
*/
|
|
35
|
-
export interface BaseCommandHaltData<T extends CommandType, M = unknown> {
|
|
36
|
-
/**
|
|
37
|
-
* Halt reason
|
|
38
|
-
*/
|
|
39
|
-
reason: CommandHaltReason;
|
|
40
|
-
/**
|
|
41
|
-
* Command execute da6a
|
|
42
|
-
*/
|
|
43
|
-
executeData: T extends CommandType.SlashCommand ? SlashCommandExecuteData<M> : T extends CommandType.MessageCommand ? MessageCommandExecuteData<M> : AnyCommandExecuteData<M>;
|
|
44
|
-
}
|
|
45
|
-
export interface CommandErrorHaltData<T extends CommandType, M = unknown> extends BaseCommandHaltData<T, M> {
|
|
46
|
-
reason: CommandHaltReason.Error;
|
|
47
|
-
/**
|
|
48
|
-
* Caught error
|
|
49
|
-
*/
|
|
50
|
-
error: any;
|
|
51
|
-
}
|
|
52
|
-
export interface CommandCooldownHaltData<T extends CommandType, M = unknown> extends BaseCommandHaltData<T, M>, CooledDownUser {
|
|
53
|
-
reason: CommandHaltReason.Cooldown;
|
|
54
|
-
}
|
|
55
|
-
export interface CommandInvalidArgumentsHaltData<T extends CommandType, M = unknown> extends BaseCommandHaltData<T, M> {
|
|
56
|
-
reason: CommandHaltReason.InvalidArguments;
|
|
57
|
-
/**
|
|
58
|
-
* Arguments that are invalid
|
|
59
|
-
*/
|
|
60
|
-
invalidArguments: MessageCommandOptionManager;
|
|
61
|
-
}
|
|
62
|
-
export interface CommandMissingArgumentsHaltData<T extends CommandType, M = unknown> extends BaseCommandHaltData<T, M> {
|
|
63
|
-
reason: CommandHaltReason.MissingArguments;
|
|
64
|
-
/**
|
|
65
|
-
* Arguments that are missing
|
|
66
|
-
*/
|
|
67
|
-
missingArguments: MessageCommandOptionManager;
|
|
68
|
-
}
|
|
69
|
-
export interface CommandMissingMemberPermissionsHaltData<T extends CommandType, M = unknown> extends BaseCommandHaltData<T, M> {
|
|
70
|
-
reason: CommandHaltReason.MissingMemberPermissions;
|
|
71
|
-
}
|
|
72
|
-
export interface CommandMissingBotPermissionsHaltData<T extends CommandType, M = unknown> extends BaseCommandHaltData<T, M> {
|
|
73
|
-
reason: CommandHaltReason.MissingBotPermissions;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Command halt reasons
|
|
77
|
-
*/
|
|
78
|
-
export declare enum CommandHaltReason {
|
|
79
|
-
Error = 1,
|
|
80
|
-
Cooldown = 2,
|
|
81
|
-
InvalidArguments = 3,
|
|
82
|
-
MissingArguments = 4,
|
|
83
|
-
MissingMemberPermissions = 5,
|
|
84
|
-
MissingBotPermissions = 6
|
|
85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C,gBAAgB,CAAC;IAC3C;;OAEG;IACH,gBAAgB,EAAE,2BAA2B,CAAC;CACjD;AAED,MAAM,WAAW,uCAAuC,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,GAAG,OAAO,CAAE,SAAQ,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC;IAC1H,MAAM,EAAE,iBAAiB,CAAC,wBAAwB,CAAC;CACtD;AAED,MAAM,WAAW,oCAAoC,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,GAAG,OAAO,CAAE,SAAQ,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC;IACvH,MAAM,EAAE,iBAAiB,CAAC,qBAAqB,CAAC;CACnD;AAED;;GAEG;AACH,oBAAY,iBAAiB;IACzB,KAAK,IAAI;IACT,QAAQ,IAAA;IACR,gBAAgB,IAAA;IAChB,gBAAgB,IAAA;IAChB,wBAAwB,IAAA;IACxB,qBAAqB,IAAA;CACxB"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { ConfigCommandPermissions } from '../classes/RecipleConfig';
|
|
2
|
-
import { Awaitable, PermissionsBitField } from 'discord.js';
|
|
3
|
-
import { RecipleModule } from '../classes/RecipleModule';
|
|
4
|
-
import { AnyCommandBuilder } from './builders';
|
|
5
|
-
export interface UserHasCommandPermissionsOptions {
|
|
6
|
-
/**
|
|
7
|
-
* Command builder
|
|
8
|
-
*/
|
|
9
|
-
builder: AnyCommandBuilder;
|
|
10
|
-
/**
|
|
11
|
-
* Member permissions
|
|
12
|
-
*/
|
|
13
|
-
memberPermissions?: PermissionsBitField;
|
|
14
|
-
/***
|
|
15
|
-
* Required command config permissions
|
|
16
|
-
*/
|
|
17
|
-
commandPermissions?: {
|
|
18
|
-
enabled: boolean;
|
|
19
|
-
commands: ConfigCommandPermissions[];
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export interface ModuleManagerResolveModuleFilesOptions {
|
|
23
|
-
/**
|
|
24
|
-
* valid reciple module (ESM or CJS) Javascript file paths
|
|
25
|
-
*/
|
|
26
|
-
files: string[];
|
|
27
|
-
/**
|
|
28
|
-
* Allow loading unsupported module versions
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
disabeVersionCheck?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Ignore errors
|
|
34
|
-
* @dafault true
|
|
35
|
-
*/
|
|
36
|
-
ignoreErrors?: boolean;
|
|
37
|
-
}
|
|
38
|
-
export interface ModuleManagerGetModulePathsOptions {
|
|
39
|
-
/**
|
|
40
|
-
* Get javascript module file paths from folders
|
|
41
|
-
*/
|
|
42
|
-
folders?: string[];
|
|
43
|
-
/**
|
|
44
|
-
* Add ignored files (wildcard)
|
|
45
|
-
* @example _*.js // Ignores _module.js and _hi.js
|
|
46
|
-
*/
|
|
47
|
-
ignoredFiles?: string[];
|
|
48
|
-
/**
|
|
49
|
-
* Filter found javascript files
|
|
50
|
-
* @param file Loaded javascript file
|
|
51
|
-
* @returns `true` if the path is acceptable
|
|
52
|
-
*/
|
|
53
|
-
filter?: (file: string) => Awaitable<boolean>;
|
|
54
|
-
}
|
|
55
|
-
export interface ModuleManagerStartModulesOptions {
|
|
56
|
-
/**
|
|
57
|
-
* Modules to start
|
|
58
|
-
*/
|
|
59
|
-
modules: RecipleModule[];
|
|
60
|
-
/**
|
|
61
|
-
* Add modules to Client modules collection
|
|
62
|
-
* @default true
|
|
63
|
-
*/
|
|
64
|
-
addToModulesCollection?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Ignore errors
|
|
67
|
-
* @default true
|
|
68
|
-
*/
|
|
69
|
-
ignoreErrors?: boolean;
|
|
70
|
-
}
|
|
71
|
-
export interface ModuleManagerLoadModulesOptions {
|
|
72
|
-
/**
|
|
73
|
-
* Modules to execute `load` method
|
|
74
|
-
*/
|
|
75
|
-
modules?: RecipleModule[];
|
|
76
|
-
/**
|
|
77
|
-
* Add commands to client
|
|
78
|
-
* @default true
|
|
79
|
-
*/
|
|
80
|
-
resolveCommands?: boolean;
|
|
81
|
-
/**
|
|
82
|
-
* Ignore errors
|
|
83
|
-
* @default true
|
|
84
|
-
*/
|
|
85
|
-
ignoreErrors?: boolean;
|
|
86
|
-
}
|
|
87
|
-
export interface ModuleManagerUnloadModulesOptions {
|
|
88
|
-
/**
|
|
89
|
-
* Modules to execute `unload` method
|
|
90
|
-
*/
|
|
91
|
-
modules?: RecipleModule[];
|
|
92
|
-
/**
|
|
93
|
-
* Reason for unloading modules
|
|
94
|
-
*/
|
|
95
|
-
reason?: string;
|
|
96
|
-
/**
|
|
97
|
-
* Ignore errors
|
|
98
|
-
* @default true
|
|
99
|
-
*/
|
|
100
|
-
ignoreErrors?: boolean;
|
|
101
|
-
}
|
|
102
|
-
//# sourceMappingURL=paramOptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paramOptions.d.ts","sourceRoot":"","sources":["../../../../src/reciple/types/paramOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,gCAAgC;IAC7C;;OAEG;IACH,OAAO,EAAE,iBAAiB,CAAC;IAC3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,mBAAmB,CAAC;IACxC;;OAEG;IACH,kBAAkB,CAAC,EAAE;QACjB,OAAO,EAAE,OAAO,CAAC;QACjB,QAAQ,EAAE,wBAAwB,EAAE,CAAC;KACxC,CAAC;CACL;AAED,MAAM,WAAW,sCAAsC;IACnD;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,kCAAkC;IAC/C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAC,OAAO,CAAC,CAAC;CACjD;AAED,MAAM,WAAW,gCAAgC;IAC7C;;OAEG;IACH,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,+BAA+B;IAC5C;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,iCAAiC;IAC9C;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { Logger } from 'fallout-utility';
|
|
3
|
-
import { AnyCommandBuilder } from './types/builders';
|
|
4
|
-
import _path from 'path';
|
|
5
|
-
/**
|
|
6
|
-
* Check if an object is a class
|
|
7
|
-
* @param object Object to identify
|
|
8
|
-
*/
|
|
9
|
-
export declare function isClass<T>(object: any): object is T;
|
|
10
|
-
/**
|
|
11
|
-
* Emit process warning about deprecated method/function
|
|
12
|
-
* @param content Warning content
|
|
13
|
-
*/
|
|
14
|
-
export declare function deprecationWarning(content: string | Error): void;
|
|
15
|
-
export declare function validateCommandBuilder(command: AnyCommandBuilder): command is AnyCommandBuilder;
|
|
16
|
-
/**
|
|
17
|
-
* Create new logger
|
|
18
|
-
* @param stringifyJSON stringify json objects in console
|
|
19
|
-
* @param debugmode display debug messages
|
|
20
|
-
* @param colorizeMessage add logger colours to messages
|
|
21
|
-
*/
|
|
22
|
-
export declare function createLogger(stringifyJSON: boolean, debugmode?: boolean, colorizeMessage?: boolean): Logger;
|
|
23
|
-
/**
|
|
24
|
-
* Path module that depending on os
|
|
25
|
-
*/
|
|
26
|
-
export declare const path: _path.PlatformPath;
|
|
27
|
-
//# sourceMappingURL=util.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/reciple/util.ts"],"names":[],"mappings":";AAAA,OAAO,EAAsB,MAAM,EAAiB,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAe,MAAM,kBAAkB,CAAC;AAGlE,OAAO,KAAK,MAAM,MAAM,CAAC;AAEzB;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,CAAC,CAMnD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAEhE;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,IAAI,iBAAiB,CAK/F;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,aAAa,EAAE,OAAO,EAAE,SAAS,GAAE,OAAe,EAAE,eAAe,GAAE,OAAc,GAAG,MAAM,CAoBxH;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,YAA8E,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import semver from 'semver';
|
|
2
|
-
/**
|
|
3
|
-
* Current reciple version
|
|
4
|
-
*/
|
|
5
|
-
export declare const version: string;
|
|
6
|
-
/**
|
|
7
|
-
* Current reciple version from package.json
|
|
8
|
-
*/
|
|
9
|
-
export declare const rawVersion: any;
|
|
10
|
-
/**
|
|
11
|
-
* Check if the version is valid
|
|
12
|
-
* @param ver Version string to validated
|
|
13
|
-
*/
|
|
14
|
-
export declare function isValidVersion(ver: string): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Parse the version string
|
|
17
|
-
* @param ver Parse version string
|
|
18
|
-
*/
|
|
19
|
-
export declare function parseVersion(ver: string): semver.SemVer | null;
|
|
20
|
-
/**
|
|
21
|
-
* Check if the given version is supported by the given version range
|
|
22
|
-
* @param versionRange Version range
|
|
23
|
-
* @param supportedVersion Version to match given version range
|
|
24
|
-
*/
|
|
25
|
-
export declare function isSupportedVersion(versionRange: string, supportedVersion?: string): boolean;
|
|
26
|
-
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/reciple/version.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;GAEG;AACH,eAAO,MAAM,OAAO,QAA+D,CAAC;AAEpF;;GAEG;AACH,eAAO,MAAM,UAAU,KAA2C,CAAC;AAEnE;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,WAEzC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,wBAIvC;AACD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,WAOjF"}
|
package/resource/reciple.yml
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
# Your bot token here
|
|
2
|
-
# To use env variable as a token just do it like this env:TOKEN_ENV
|
|
3
|
-
token: TOKEN
|
|
4
|
-
|
|
5
|
-
# Commands options
|
|
6
|
-
commands:
|
|
7
|
-
# Interaction command options
|
|
8
|
-
slashCommand:
|
|
9
|
-
# enable interaction commands
|
|
10
|
-
enabled: true
|
|
11
|
-
# reply when an error occured
|
|
12
|
-
replyOnError: false
|
|
13
|
-
# enable the use of command cooldowns
|
|
14
|
-
enableCooldown: true
|
|
15
|
-
# register interaction commands on bot ready
|
|
16
|
-
registerCommands: true
|
|
17
|
-
# allow register empty list of application commands
|
|
18
|
-
allowRegisterEmptyCommandList: true
|
|
19
|
-
# set required permissions for interaction commands
|
|
20
|
-
setRequiredPermissions: true
|
|
21
|
-
# accept replied or deffered command interaction
|
|
22
|
-
acceptRepliedInteractions: false
|
|
23
|
-
# legacy permissions checking
|
|
24
|
-
useLegacyPermissionsChecking: false
|
|
25
|
-
# register commands to specific guild(s) empty to make it global
|
|
26
|
-
guilds: []
|
|
27
|
-
# overwrite command permissions
|
|
28
|
-
permissions:
|
|
29
|
-
# enable overwriten command permissions
|
|
30
|
-
enabled: false
|
|
31
|
-
commands:
|
|
32
|
-
- command: example-command
|
|
33
|
-
permissions:
|
|
34
|
-
- Administrator
|
|
35
|
-
|
|
36
|
-
# message command options
|
|
37
|
-
messageCommand:
|
|
38
|
-
# enable message commands
|
|
39
|
-
enabled: true
|
|
40
|
-
# command prefix
|
|
41
|
-
prefix: '!'
|
|
42
|
-
# reply when an error occured
|
|
43
|
-
replyOnError: false
|
|
44
|
-
# enable the use of command cooldowns
|
|
45
|
-
enableCooldown: true
|
|
46
|
-
# allow executing commands via aliases
|
|
47
|
-
allowCommandAlias: true
|
|
48
|
-
# command argument separator
|
|
49
|
-
commandArgumentSeparator: ' '
|
|
50
|
-
# overwrite command permissions
|
|
51
|
-
permissions:
|
|
52
|
-
# enable overwriten command permissions
|
|
53
|
-
enabled: false
|
|
54
|
-
commands:
|
|
55
|
-
- command: example-command
|
|
56
|
-
permissions:
|
|
57
|
-
- Administrator
|
|
58
|
-
|
|
59
|
-
# Logger options
|
|
60
|
-
fileLogging:
|
|
61
|
-
# enable console output to file
|
|
62
|
-
enabled: true
|
|
63
|
-
# enable debug mode
|
|
64
|
-
debugmode: false
|
|
65
|
-
# enable if reciple will use the logger
|
|
66
|
-
clientLogs: true
|
|
67
|
-
# stringify logged JSONs
|
|
68
|
-
stringifyLoggedJSON: false
|
|
69
|
-
# log file path
|
|
70
|
-
logFilePath: logs/latest.log
|
|
71
|
-
|
|
72
|
-
# Client options
|
|
73
|
-
# Learn more about client options at https://discord.js.org/#/docs/discord.js/main/typedef/ClientOptions
|
|
74
|
-
client:
|
|
75
|
-
intents:
|
|
76
|
-
- Guilds
|
|
77
|
-
- GuildMembers
|
|
78
|
-
- GuildMessages
|
|
79
|
-
- MessageContent
|
|
80
|
-
|
|
81
|
-
# Bot messages
|
|
82
|
-
messages:
|
|
83
|
-
missingArguments: Not enough arguments.
|
|
84
|
-
invalidArguments: Invalid argument(s) given.
|
|
85
|
-
insufficientBotPerms:
|
|
86
|
-
content: Insufficient bot permissions.
|
|
87
|
-
ephemeral: true
|
|
88
|
-
noPermissions:
|
|
89
|
-
content: You do not have permission to use this command.
|
|
90
|
-
ephemeral: true
|
|
91
|
-
cooldown:
|
|
92
|
-
content: You cannot execute this command right now due to the cooldown.
|
|
93
|
-
ephemeral: true
|
|
94
|
-
error:
|
|
95
|
-
content: An error occurred.
|
|
96
|
-
ephemeral: true
|
|
97
|
-
|
|
98
|
-
# Ignored Files
|
|
99
|
-
ignoredFiles:
|
|
100
|
-
- '_*'
|
|
101
|
-
- '.*'
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
####################################################
|
|
105
|
-
# #
|
|
106
|
-
# ##### ##### # # ### ##### #### #
|
|
107
|
-
# # # # # # # # # # # # #
|
|
108
|
-
# # # ##### # # # # ### ### #### #
|
|
109
|
-
# # # # # # # # # # # # #
|
|
110
|
-
# ### # # # # ### ##### # # #
|
|
111
|
-
# #
|
|
112
|
-
####################################################
|
|
113
|
-
## Modifying the values below could break reciple ##
|
|
114
|
-
|
|
115
|
-
# Modules folder
|
|
116
|
-
modulesFolder: 'modules'
|
|
117
|
-
|
|
118
|
-
# Load modules regardless of its supported versions
|
|
119
|
-
disableVersionCheck: false
|
|
120
|
-
|
|
121
|
-
# Current version
|
|
122
|
-
version: ^VERSION
|