reciple 6.0.4 → 7.0.0-dev.11

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.
Files changed (112) hide show
  1. package/LICENSE +674 -674
  2. package/README.md +193 -182
  3. package/bin/bin.d.mts +2 -0
  4. package/bin/bin.mjs +73 -0
  5. package/bin/bin.mjs.map +1 -0
  6. package/bin/classes/Config.d.ts +32 -0
  7. package/bin/classes/Config.js +72 -0
  8. package/bin/classes/Config.js.map +1 -0
  9. package/bin/esm.d.mts +1 -0
  10. package/{dist/lib → bin}/esm.mjs +0 -0
  11. package/bin/esm.mjs.map +1 -0
  12. package/bin/exports.d.ts +4 -0
  13. package/bin/exports.js +21 -0
  14. package/bin/exports.js.map +1 -0
  15. package/bin/index.d.ts +2 -0
  16. package/bin/index.js +19 -0
  17. package/bin/index.js.map +1 -0
  18. package/bin/utils/cli.d.ts +4 -0
  19. package/bin/utils/cli.js +20 -0
  20. package/bin/utils/cli.js.map +1 -0
  21. package/bin/utils/logger.d.ts +6 -0
  22. package/bin/utils/logger.js +61 -0
  23. package/bin/utils/logger.js.map +1 -0
  24. package/bin/utils/modules.d.ts +3 -0
  25. package/bin/utils/modules.js +35 -0
  26. package/bin/utils/modules.js.map +1 -0
  27. package/package.json +26 -66
  28. package/static/config.yml +97 -0
  29. package/dist/lib/bin.mjs +0 -77
  30. package/dist/lib/bin.mjs.map +0 -1
  31. package/dist/lib/esm.mjs.map +0 -1
  32. package/dist/lib/index.js +0 -34
  33. package/dist/lib/index.js.map +0 -1
  34. package/dist/lib/reciple/classes/RecipleClient.js +0 -293
  35. package/dist/lib/reciple/classes/RecipleClient.js.map +0 -1
  36. package/dist/lib/reciple/classes/RecipleConfig.js +0 -107
  37. package/dist/lib/reciple/classes/RecipleConfig.js.map +0 -1
  38. package/dist/lib/reciple/classes/RecipleModule.js +0 -137
  39. package/dist/lib/reciple/classes/RecipleModule.js.map +0 -1
  40. package/dist/lib/reciple/classes/builders/MessageCommandBuilder.js +0 -316
  41. package/dist/lib/reciple/classes/builders/MessageCommandBuilder.js.map +0 -1
  42. package/dist/lib/reciple/classes/builders/MessageCommandOptionBuilder.js +0 -127
  43. package/dist/lib/reciple/classes/builders/MessageCommandOptionBuilder.js.map +0 -1
  44. package/dist/lib/reciple/classes/builders/SlashCommandBuilder.js +0 -253
  45. package/dist/lib/reciple/classes/builders/SlashCommandBuilder.js.map +0 -1
  46. package/dist/lib/reciple/classes/managers/ApplicationCommandManager.js +0 -179
  47. package/dist/lib/reciple/classes/managers/ApplicationCommandManager.js.map +0 -1
  48. package/dist/lib/reciple/classes/managers/CommandCooldownManager.js +0 -100
  49. package/dist/lib/reciple/classes/managers/CommandCooldownManager.js.map +0 -1
  50. package/dist/lib/reciple/classes/managers/CommandManager.js +0 -65
  51. package/dist/lib/reciple/classes/managers/CommandManager.js.map +0 -1
  52. package/dist/lib/reciple/classes/managers/MessageCommandOptionManager.js +0 -26
  53. package/dist/lib/reciple/classes/managers/MessageCommandOptionManager.js.map +0 -1
  54. package/dist/lib/reciple/classes/managers/ModuleManager.js +0 -181
  55. package/dist/lib/reciple/classes/managers/ModuleManager.js.map +0 -1
  56. package/dist/lib/reciple/flags.js +0 -32
  57. package/dist/lib/reciple/flags.js.map +0 -1
  58. package/dist/lib/reciple/permissions.js +0 -31
  59. package/dist/lib/reciple/permissions.js.map +0 -1
  60. package/dist/lib/reciple/types/builders.js +0 -12
  61. package/dist/lib/reciple/types/builders.js.map +0 -1
  62. package/dist/lib/reciple/types/commands.js +0 -16
  63. package/dist/lib/reciple/types/commands.js.map +0 -1
  64. package/dist/lib/reciple/types/paramOptions.js +0 -3
  65. package/dist/lib/reciple/types/paramOptions.js.map +0 -1
  66. package/dist/lib/reciple/util.js +0 -72
  67. package/dist/lib/reciple/util.js.map +0 -1
  68. package/dist/lib/reciple/version.js +0 -48
  69. package/dist/lib/reciple/version.js.map +0 -1
  70. package/dist/types/bin.d.mts +0 -3
  71. package/dist/types/bin.d.mts.map +0 -1
  72. package/dist/types/esm.d.mts +0 -2
  73. package/dist/types/esm.d.mts.map +0 -1
  74. package/dist/types/index.d.ts +0 -18
  75. package/dist/types/index.d.ts.map +0 -1
  76. package/dist/types/reciple/classes/RecipleClient.d.ts +0 -116
  77. package/dist/types/reciple/classes/RecipleClient.d.ts.map +0 -1
  78. package/dist/types/reciple/classes/RecipleConfig.d.ts +0 -102
  79. package/dist/types/reciple/classes/RecipleConfig.d.ts.map +0 -1
  80. package/dist/types/reciple/classes/RecipleModule.d.ts +0 -88
  81. package/dist/types/reciple/classes/RecipleModule.d.ts.map +0 -1
  82. package/dist/types/reciple/classes/builders/MessageCommandBuilder.d.ts +0 -198
  83. package/dist/types/reciple/classes/builders/MessageCommandBuilder.d.ts.map +0 -1
  84. package/dist/types/reciple/classes/builders/MessageCommandOptionBuilder.d.ts +0 -54
  85. package/dist/types/reciple/classes/builders/MessageCommandOptionBuilder.d.ts.map +0 -1
  86. package/dist/types/reciple/classes/builders/SlashCommandBuilder.d.ts +0 -107
  87. package/dist/types/reciple/classes/builders/SlashCommandBuilder.d.ts.map +0 -1
  88. package/dist/types/reciple/classes/managers/ApplicationCommandManager.d.ts +0 -54
  89. package/dist/types/reciple/classes/managers/ApplicationCommandManager.d.ts.map +0 -1
  90. package/dist/types/reciple/classes/managers/CommandCooldownManager.d.ts +0 -71
  91. package/dist/types/reciple/classes/managers/CommandCooldownManager.d.ts.map +0 -1
  92. package/dist/types/reciple/classes/managers/CommandManager.d.ts +0 -35
  93. package/dist/types/reciple/classes/managers/CommandManager.d.ts.map +0 -1
  94. package/dist/types/reciple/classes/managers/MessageCommandOptionManager.d.ts +0 -23
  95. package/dist/types/reciple/classes/managers/MessageCommandOptionManager.d.ts.map +0 -1
  96. package/dist/types/reciple/classes/managers/ModuleManager.d.ts +0 -50
  97. package/dist/types/reciple/classes/managers/ModuleManager.d.ts.map +0 -1
  98. package/dist/types/reciple/flags.d.ts +0 -18
  99. package/dist/types/reciple/flags.d.ts.map +0 -1
  100. package/dist/types/reciple/permissions.d.ts +0 -16
  101. package/dist/types/reciple/permissions.d.ts.map +0 -1
  102. package/dist/types/reciple/types/builders.d.ts +0 -206
  103. package/dist/types/reciple/types/builders.d.ts.map +0 -1
  104. package/dist/types/reciple/types/commands.d.ts +0 -86
  105. package/dist/types/reciple/types/commands.d.ts.map +0 -1
  106. package/dist/types/reciple/types/paramOptions.d.ts +0 -102
  107. package/dist/types/reciple/types/paramOptions.d.ts.map +0 -1
  108. package/dist/types/reciple/util.d.ts +0 -27
  109. package/dist/types/reciple/util.d.ts.map +0 -1
  110. package/dist/types/reciple/version.d.ts +0 -26
  111. package/dist/types/reciple/version.d.ts.map +0 -1
  112. package/resource/reciple.yml +0 -122
@@ -1,293 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RecipleClient = exports.RecipleEvents = void 0;
4
- const discord_js_1 = require("discord.js");
5
- const MessageCommandBuilder_1 = require("./builders/MessageCommandBuilder");
6
- const SlashCommandBuilder_1 = require("./builders/SlashCommandBuilder");
7
- const commands_1 = require("../types/commands");
8
- const CommandCooldownManager_1 = require("./managers/CommandCooldownManager");
9
- const builders_1 = require("../types/builders");
10
- const permissions_1 = require("../permissions");
11
- const MessageCommandOptionManager_1 = require("./managers/MessageCommandOptionManager");
12
- const ApplicationCommandManager_1 = require("./managers/ApplicationCommandManager");
13
- const util_1 = require("../util");
14
- const CommandManager_1 = require("./managers/CommandManager");
15
- const ModuleManager_1 = require("./managers/ModuleManager");
16
- const RecipleConfig_1 = require("./RecipleConfig");
17
- const fallout_utility_1 = require("fallout-utility");
18
- const version_js_1 = require("../version.js");
19
- const flags_1 = require("../flags");
20
- var RecipleEvents;
21
- (function (RecipleEvents) {
22
- RecipleEvents["RecipleCommandExecute"] = "recipleCommandExecute";
23
- RecipleEvents["RecipleCommandHalt"] = "recipleCommandHalt";
24
- RecipleEvents["RecipleRegisterApplicationCommands"] = "recipleRegisterApplicationCommands";
25
- RecipleEvents["RecipleReplyError"] = "recipleReplyError";
26
- RecipleEvents["CommandExecute"] = "recipleCommandExecute";
27
- RecipleEvents["CommandHalt"] = "recipleCommandHalt";
28
- RecipleEvents["RegisterApplicationCommands"] = "recipleRegisterApplicationCommands";
29
- RecipleEvents["ReplyError"] = "recipleReplyError";
30
- })(RecipleEvents = exports.RecipleEvents || (exports.RecipleEvents = {}));
31
- class RecipleClient extends discord_js_1.Client {
32
- get isClientLogsSilent() {
33
- return !this.config.fileLogging.clientLogs;
34
- }
35
- /**
36
- * @param options Client options
37
- */
38
- constructor(options) {
39
- super(options);
40
- this.config = RecipleConfig_1.RecipleConfig.getDefaultConfig();
41
- this.commands = new CommandManager_1.CommandManager({
42
- client: this,
43
- });
44
- this.cooldowns = new CommandCooldownManager_1.CommandCooldownManager();
45
- this.modules = new ModuleManager_1.ModuleManager({
46
- client: this,
47
- });
48
- this.version = version_js_1.version;
49
- this.logger = (0, util_1.createLogger)(!!options.config?.fileLogging.stringifyLoggedJSON, options.config?.fileLogging.debugmode);
50
- this.config = { ...this.config, ...(options.config ?? {}) };
51
- if (this.config.fileLogging.enabled)
52
- this.logger.logFile(util_1.path.join(flags_1.cwd, this.config.fileLogging.logFilePath ?? 'logs/latest.log'), false);
53
- this.cwd = options.cwd ?? process.cwd();
54
- this.applicationCommands = new ApplicationCommandManager_1.ApplicationCommandManager(this);
55
- }
56
- /**
57
- * Listed to command executions
58
- * @deprecated Not useful
59
- */
60
- addCommandListeners() {
61
- (0, util_1.deprecationWarning)(`RecipleClient#addCommandListeners() is deprecated! Listen to commands manually.`);
62
- this.on(discord_js_1.Events.MessageCreate, message => {
63
- if (this.config.commands.messageCommand.enabled)
64
- this.messageCommandExecute(message);
65
- });
66
- this.on(discord_js_1.Events.InteractionCreate, interaction => {
67
- if (this.config.commands.slashCommand.enabled)
68
- this.slashCommandExecute(interaction);
69
- });
70
- return this;
71
- }
72
- /**
73
- * Execute a slash command
74
- * @param interaction Slash command interaction
75
- */
76
- async slashCommandExecute(interaction) {
77
- if (!interaction || !interaction.isChatInputCommand() || !this.isReady())
78
- return;
79
- if (!this.config.commands.slashCommand.acceptRepliedInteractions && (interaction.replied || interaction.deferred))
80
- return;
81
- const command = this.commands.get(interaction.commandName, builders_1.CommandType.SlashCommand);
82
- if (!command)
83
- return;
84
- const executeData = {
85
- type: command.type,
86
- interaction,
87
- builder: command,
88
- client: this,
89
- };
90
- const userCooldown = {
91
- user: interaction.user,
92
- command: command.name,
93
- channel: interaction.channel ?? undefined,
94
- guild: interaction.guild,
95
- type: builders_1.CommandType.SlashCommand,
96
- };
97
- if (this.config.commands.slashCommand.useLegacyPermissionsChecking &&
98
- !(0, permissions_1.userHasCommandPermissions)({
99
- builder: command,
100
- memberPermissions: interaction.memberPermissions ?? undefined,
101
- commandPermissions: this.config.commands.slashCommand.permissions,
102
- })) {
103
- if (!(await this._haltCommand(command, { executeData, reason: commands_1.CommandHaltReason.MissingMemberPermissions }))) {
104
- await interaction.reply(this.getConfigMessage('noPermissions', 'You do not have permission to use this command.')).catch(er => this._replyError(er));
105
- }
106
- return;
107
- }
108
- if (interaction.inCachedGuild() && !(0, permissions_1.botHasExecutePermissions)(interaction.channel || interaction.guild, command.requiredBotPermissions)) {
109
- if (!(await this._haltCommand(command, { executeData, reason: commands_1.CommandHaltReason.MissingBotPermissions }))) {
110
- await interaction.reply(this.getConfigMessage('insufficientBotPerms', 'Insufficient bot permissions.')).catch(er => this._replyError(er));
111
- }
112
- return;
113
- }
114
- if (this.config.commands.slashCommand.enableCooldown && command.cooldown && !this.cooldowns.isCooledDown(userCooldown)) {
115
- this.cooldowns.add({
116
- ...userCooldown,
117
- expireTime: Date.now() + command.cooldown,
118
- });
119
- }
120
- else if (this.config.commands.slashCommand.enableCooldown && command.cooldown) {
121
- if (!(await this._haltCommand(command, { executeData, reason: commands_1.CommandHaltReason.Cooldown, ...this.cooldowns.get(userCooldown) }))) {
122
- await interaction.reply(this.getConfigMessage('cooldown', 'You cannot execute this command right now due to the cooldown.')).catch(er => this._replyError(er));
123
- }
124
- return;
125
- }
126
- return this._executeCommand(command, executeData);
127
- }
128
- /**
129
- * Execute a Message command
130
- * @param message Message command executor
131
- * @param prefix Message command prefix
132
- */
133
- async messageCommandExecute(message, prefix) {
134
- if (!message.content || !this.isReady())
135
- return;
136
- const parseCommand = (0, fallout_utility_1.getCommand)(message.content, prefix || this.config.commands.messageCommand.prefix || '!', this.config.commands.messageCommand.commandArgumentSeparator || ' ');
137
- if (!parseCommand || !parseCommand?.command)
138
- return;
139
- const command = this.commands.get(parseCommand.command, builders_1.CommandType.MessageCommand);
140
- if (!command)
141
- return;
142
- const commandOptions = await MessageCommandBuilder_1.MessageCommandBuilder.validateOptions(command, parseCommand);
143
- const executeData = {
144
- type: command.type,
145
- message: message,
146
- options: commandOptions,
147
- command: parseCommand,
148
- builder: command,
149
- client: this,
150
- };
151
- const userCooldown = {
152
- user: message.author,
153
- command: command.name,
154
- channel: message.channel,
155
- guild: message.guild,
156
- type: builders_1.CommandType.MessageCommand,
157
- };
158
- if ((!command.allowExecuteInDM && message.channel.type === discord_js_1.ChannelType.DM) || (!command.allowExecuteByBots && (message.author.bot || message.author.system)))
159
- return;
160
- if (!(0, permissions_1.userHasCommandPermissions)({
161
- builder: command,
162
- memberPermissions: message.member?.permissions,
163
- commandPermissions: this.config.commands.messageCommand.permissions,
164
- })) {
165
- if (!(await this._haltCommand(command, { executeData, reason: commands_1.CommandHaltReason.MissingMemberPermissions }))) {
166
- await message.reply(this.getConfigMessage('noPermissions', 'You do not have permission to use this command.')).catch(er => this._replyError(er));
167
- }
168
- return;
169
- }
170
- if (command.validateOptions) {
171
- if (commandOptions.some(o => o.invalid)) {
172
- if (!(await this._haltCommand(command, {
173
- executeData,
174
- reason: commands_1.CommandHaltReason.InvalidArguments,
175
- invalidArguments: new MessageCommandOptionManager_1.MessageCommandOptionManager(...executeData.options.filter(o => o.invalid)),
176
- }))) {
177
- message.reply(this.getConfigMessage('invalidArguments', 'Invalid argument(s) given.')).catch(er => this._replyError(er));
178
- }
179
- return;
180
- }
181
- if (commandOptions.some(o => o.missing)) {
182
- if (!(await this._haltCommand(command, {
183
- executeData,
184
- reason: commands_1.CommandHaltReason.MissingArguments,
185
- missingArguments: new MessageCommandOptionManager_1.MessageCommandOptionManager(...executeData.options.filter(o => o.missing)),
186
- }))) {
187
- message.reply(this.getConfigMessage('missingArguments', 'Not enough arguments.')).catch(er => this._replyError(er));
188
- }
189
- return;
190
- }
191
- }
192
- if (message.inGuild() && !(0, permissions_1.botHasExecutePermissions)(message.channel || message.guild, command.requiredBotPermissions)) {
193
- if (!(await this._haltCommand(command, { executeData, reason: commands_1.CommandHaltReason.MissingBotPermissions }))) {
194
- message.reply(this.getConfigMessage('insufficientBotPerms', 'Insufficient bot permissions.')).catch(er => this._replyError(er));
195
- }
196
- return;
197
- }
198
- if (this.config.commands.messageCommand.enableCooldown && command.cooldown && !this.cooldowns.isCooledDown(userCooldown)) {
199
- this.cooldowns.add({
200
- ...userCooldown,
201
- expireTime: Date.now() + command.cooldown,
202
- });
203
- }
204
- else if (this.config.commands.messageCommand.enableCooldown && command.cooldown) {
205
- if (!(await this._haltCommand(command, { executeData, reason: commands_1.CommandHaltReason.Cooldown, ...this.cooldowns.get(userCooldown) }))) {
206
- await message.reply(this.getConfigMessage('cooldown', 'You cannot execute this command right now due to the cooldown.')).catch(er => this._replyError(er));
207
- }
208
- return;
209
- }
210
- return this._executeCommand(command, executeData);
211
- }
212
- /**
213
- * Get a message from config
214
- * @param messageKey Config messages key
215
- * @param defaultMessage Default message when the key does not exists
216
- */
217
- getConfigMessage(messageKey, defaultMessage) {
218
- return this.config.messages[messageKey] ?? defaultMessage ?? messageKey;
219
- }
220
- /**
221
- * Emits the {@link RecipleClientEvents["recipleReplyError"]} event
222
- * @param error Received Error
223
- */
224
- _replyError(error) {
225
- this.emit(RecipleEvents.ReplyError, error);
226
- }
227
- async _haltCommand(command, haltData) {
228
- try {
229
- const haltResolved = (command.halt
230
- ? await Promise.resolve(command.type == builders_1.CommandType.SlashCommand ? command.halt(haltData) : command.halt(haltData)).catch(err => {
231
- throw err;
232
- })
233
- : false) || false;
234
- this.emit(RecipleEvents.CommandHalt, haltData);
235
- return haltResolved;
236
- }
237
- catch (err) {
238
- if (!this.isClientLogsSilent) {
239
- this.logger.error(`An error occured executing command halt for "${command.name}"`);
240
- this.logger.error(err);
241
- }
242
- return false;
243
- }
244
- }
245
- async _executeCommand(command, executeData) {
246
- try {
247
- await Promise.resolve(command.type === builders_1.CommandType.SlashCommand ? command.execute(executeData) : command.execute(executeData))
248
- .then(() => this.emit(RecipleEvents.CommandExecute, executeData))
249
- .catch(async (err) => !(await this._haltCommand(command, {
250
- executeData: executeData,
251
- reason: commands_1.CommandHaltReason.Error,
252
- error: err,
253
- }))
254
- ? this._commandExecuteError(err, executeData)
255
- : void 0);
256
- return executeData;
257
- }
258
- catch (err) {
259
- if (await this._haltCommand(command, {
260
- executeData: executeData,
261
- reason: commands_1.CommandHaltReason.Error,
262
- error: err,
263
- }))
264
- return;
265
- await this._commandExecuteError(err, executeData);
266
- }
267
- }
268
- /**
269
- * Error message when a command fails to execute
270
- * @param err Received error
271
- * @param command Slash/Message command execute data
272
- */
273
- async _commandExecuteError(err, command) {
274
- if (!this.isClientLogsSilent) {
275
- this.logger.error(`An error occured executing ${command.builder.type == builders_1.CommandType.MessageCommand ? 'message' : 'slash'} command "${command.builder.name}"`);
276
- this.logger.error(err);
277
- }
278
- if (!err || !command)
279
- return;
280
- if (SlashCommandBuilder_1.SlashCommandBuilder.isSlashCommandExecuteData(command)) {
281
- if (!this.config.commands.slashCommand.replyOnError)
282
- return;
283
- await command.interaction.followUp(this.getConfigMessage('error', 'An error occurred.')).catch(er => this._replyError(er));
284
- }
285
- else if (MessageCommandBuilder_1.MessageCommandBuilder.isMessageCommandExecuteData(command)) {
286
- if (!this.config.commands.messageCommand.replyOnError)
287
- return;
288
- await command.message.reply(this.getConfigMessage('error', 'An error occurred.')).catch(er => this._replyError(er));
289
- }
290
- }
291
- }
292
- exports.RecipleClient = RecipleClient;
293
- //# sourceMappingURL=RecipleClient.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RecipleClient.js","sourceRoot":"","sources":["../../../../src/reciple/classes/RecipleClient.ts"],"names":[],"mappings":";;;AAAA,2CAAoJ;AACpJ,4EAA4H;AAC5H,wEAAoH;AACpH,gDAAiG;AACjG,8EAA2F;AAC3F,gDAA2F;AAC3F,gDAAqF;AACrF,wFAAqF;AACrF,oFAAiF;AACjF,kCAAiE;AACjE,8DAA2D;AAC3D,4DAAyD;AACzD,mDAAwD;AACxD,qDAAqD;AACrD,8CAAwC;AACxC,oCAA+B;AAoB/B,IAAY,aAUX;AAVD,WAAY,aAAa;IACrB,gEAA+C,CAAA;IAC/C,0DAAyC,CAAA;IACzC,0FAAyE,CAAA;IACzE,wDAAuC,CAAA;IAEvC,yDAAsC,CAAA;IACtC,mDAAgC,CAAA;IAChC,mFAAgE,CAAA;IAChE,iDAA8B,CAAA;AAClC,CAAC,EAVW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAUxB;AAwBD,MAAa,aAA+C,SAAQ,mBAAa;IAc7E,IAAI,kBAAkB;QAClB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,YAAY,OAA6B;QACrC,KAAK,CAAC,OAAO,CAAC,CAAC;QArBV,WAAM,GAAW,6BAAa,CAAC,gBAAgB,EAAE,CAAC;QAClD,aAAQ,GAAmB,IAAI,+BAAc,CAAC;YACnD,MAAM,EAAE,IAAI;SACf,CAAC,CAAC;QAEM,cAAS,GAA2B,IAAI,+CAAsB,EAAE,CAAC;QACjE,YAAO,GAAkB,IAAI,6BAAa,CAAC;YAChD,MAAM,EAAE,IAAI;SACf,CAAC,CAAC;QAGM,YAAO,GAAW,oBAAO,CAAC;QAY/B,IAAI,CAAC,MAAM,GAAG,IAAA,mBAAY,EAAC,CAA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E7B,IAAI,yCAAmB,CAAC,yBAAyB,CAAC,OAAO,CAAC,EAAE;YACxD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,YAAY;gBAAE,OAAO;YAC5D,MAAM,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC;SAC9H;aAAM,IAAI,6CAAqB,CAAC,2BAA2B,CAAC,OAAO,CAAC,EAAE;YACnE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,YAAY;gBAAE,OAAO;YAC9D,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC;SACvH;IACL,CAAC;CACJ;AA3TD,sCA2TC"}
@@ -1,107 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.RecipleConfig = void 0;
7
- const fs_1 = require("fs");
8
- const version_1 = require("../version");
9
- const fallout_utility_1 = require("fallout-utility");
10
- const flags_1 = require("../flags");
11
- const util_1 = require("../util");
12
- const yaml_1 = __importDefault(require("yaml"));
13
- /**
14
- * Create/parse reciple config
15
- */
16
- class RecipleConfig {
17
- /**
18
- * @param configPath Path to config
19
- */
20
- constructor(configPath) {
21
- this.config = RecipleConfig.getDefaultConfig();
22
- this.configPath = util_1.path.join(process.cwd(), 'reciple.yml');
23
- if (!configPath)
24
- throw new Error('Config path is not defined');
25
- this.configPath = configPath;
26
- }
27
- /**
28
- * Parse the config file
29
- */
30
- parseConfig() {
31
- if (!(0, fs_1.existsSync)(this.configPath)) {
32
- const defaultConfigPath = RecipleConfig.defaultConfigPath;
33
- if (!(0, fs_1.existsSync)(defaultConfigPath))
34
- throw new Error('Default Config file not found. Please reinstall Reciple.');
35
- const defaultConfig = (0, fallout_utility_1.replaceAll)((0, fs_1.readFileSync)(defaultConfigPath, 'utf-8'), 'VERSION', version_1.version);
36
- (0, fs_1.writeFileSync)(this.configPath, defaultConfig, 'utf-8');
37
- if (!(0, fs_1.existsSync)(this.configPath))
38
- throw new Error('Failed to create config file.');
39
- this.config = yaml_1.default.parse(defaultConfig);
40
- if (this.config && this.config.token === 'TOKEN') {
41
- this.config.token = this._askToken() || this.config.token;
42
- (0, fs_1.writeFileSync)(this.configPath, (0, fallout_utility_1.replaceAll)(defaultConfig, ' TOKEN', ` ${this.config.token}`), 'utf-8');
43
- }
44
- return this;
45
- }
46
- if (!(0, fs_1.existsSync)(this.configPath))
47
- throw new Error('Failed to read config file.');
48
- const config = (0, fs_1.readFileSync)(this.configPath, 'utf-8');
49
- this.config = yaml_1.default.parse(config);
50
- if (!this._isSupportedConfig())
51
- throw new Error('Unsupported config version. Your config version: ' + (this.config?.version || 'No version specified.') + ', Reciple version: ' + version_1.version);
52
- return this;
53
- }
54
- /**
55
- * Returns the parsed config file
56
- */
57
- getConfig() {
58
- if (!this.config)
59
- throw new Error('Config is not parsed.');
60
- this.config.token = this.parseToken() || 'TOKEN';
61
- return this.config;
62
- }
63
- /**
64
- * Parse token from config
65
- * @param askIfEmpty Ask for token if the token is undefined
66
- */
67
- parseToken(askIfEmpty = true) {
68
- let token = flags_1.token || this.config?.token || undefined;
69
- if (!token)
70
- return token || (askIfEmpty ? this._askToken() : null);
71
- const envToken = token.toString().split(':');
72
- if (envToken.length === 2 && envToken[0].toLocaleLowerCase() === 'env' && envToken[1]) {
73
- token = process.env[envToken[1]] || undefined;
74
- }
75
- return token || (askIfEmpty == null ? this._askToken() : null);
76
- }
77
- /**
78
- * Check if the config version is supported
79
- */
80
- _isSupportedConfig() {
81
- return (0, version_1.isSupportedVersion)(this.config?.version || '0.0.0', version_1.version);
82
- }
83
- /**
84
- * Ask for a token
85
- */
86
- _askToken() {
87
- return (flags_1.token ||
88
- (0, fallout_utility_1.input)({
89
- text: 'Bot Token >>> ',
90
- echo: '*',
91
- repeatIfEmpty: true,
92
- sigint: true,
93
- }) ||
94
- null);
95
- }
96
- /**
97
- * Get default config
98
- */
99
- static getDefaultConfig() {
100
- if (!(0, fs_1.existsSync)(this.defaultConfigPath))
101
- throw new Error(`Default config file does not exists: ${this.defaultConfigPath}`);
102
- return yaml_1.default.parse((0, fs_1.readFileSync)(this.defaultConfigPath, 'utf-8'));
103
- }
104
- }
105
- exports.RecipleConfig = RecipleConfig;
106
- RecipleConfig.defaultConfigPath = util_1.path.join(__dirname, '../../../../resource/reciple.yml');
107
- //# sourceMappingURL=RecipleConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RecipleConfig.js","sourceRoot":"","sources":["../../../../src/reciple/classes/RecipleConfig.ts"],"names":[],"mappings":";;;;;;AACA,2BAA6D;AAC7D,wCAAyD;AACzD,qDAAoD;AACpD,oCAA4C;AAC5C,kCAA+B;AAC/B,gDAAwB;AAmExB;;GAEG;AACH,MAAa,aAAa;IAKtB;;OAEG;IACH,YAAY,UAAkB;QAPvB,WAAM,GAAW,aAAa,CAAC,gBAAgB,EAAE,CAAC;QAClD,eAAU,GAAW,WAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,aAAa,CAAC,CAAC;QAOhE,IAAI,CAAC,UAAU;YAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAC/D,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,WAAW;QACd,IAAI,CAAC,IAAA,eAAU,EAAC,IAAI,CAAC,UAAU,CAAC,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AA,4BAAkB,EAAC,IAAI,CAAC,MAAM,EAAE,OAAO,IAAI,OAAO,EAAE,iBAAO,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACO,SAAS;QACf,OAAO,CACH,aAAO;YACP,IAAA,uBAAK,EAAC;gBACF,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,GAAG;gBACT,aAAa,EAAE,IAAI;gBACnB,MAAM,EAAE,IAAI;aACf,CAAC;YACF,IAAI,CACP,CAAC;IACN,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,gBAAgB;QAC1B,IAAI,CAAC,IAAA,eAAU,EAAC,IAAI,CAAC,iBAAiB,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAE3H,OAAO,cAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC,CAAC;IACrE,CAAC;;AArGL,sCAsGC;AAnGiB,+BAAiB,GAAG,WAAI,CAAC,IAAI,CAAC,SAAS,EAAE,kCAAkC,CAAC,CAAC"}
@@ -1,137 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RecipleModule = void 0;
4
- const builders_1 = require("../types/builders");
5
- const discord_js_1 = require("discord.js");
6
- const MessageCommandBuilder_1 = require("./builders/MessageCommandBuilder");
7
- const SlashCommandBuilder_1 = require("./builders/SlashCommandBuilder");
8
- const util_1 = require("../util");
9
- const version_1 = require("../version");
10
- const crypto_1 = require("crypto");
11
- class RecipleModule {
12
- get versions() {
13
- return this.script.versions;
14
- }
15
- get onStart() {
16
- return this.script.onStart;
17
- }
18
- get onLoad() {
19
- return this.script.onLoad;
20
- }
21
- get onUnload() {
22
- return this.script.onUnload;
23
- }
24
- get displayName() {
25
- return this.filePath ?? this.id;
26
- }
27
- get isSupported() {
28
- return (0, discord_js_1.normalizeArray)([this.versions]).some(v => (0, version_1.isSupportedVersion)(v, this.client.version));
29
- }
30
- constructor(options) {
31
- this.commands = [];
32
- this.id = (0, crypto_1.randomUUID)();
33
- this.client = options.client;
34
- this.script = options.script;
35
- this.filePath = options.filePath;
36
- this.metadata = options.metadata;
37
- }
38
- /**
39
- * Execute module's {@link RecipleScript.onStart}
40
- */
41
- async start() {
42
- return Promise.resolve(this.script.onStart(this.client));
43
- }
44
- /**
45
- * Execute module's {@link RecipleScript.onLoad}
46
- * @param resolveCommands Parse commands
47
- */
48
- async load(resolveCommands = true) {
49
- if (typeof this.script.onLoad === 'function')
50
- await this.script.onLoad(this.client);
51
- if (resolveCommands)
52
- this.resolveCommands();
53
- }
54
- /**
55
- * Execute module's {@link RecipleScript.onUnload}
56
- * @param reason Unload reason
57
- */
58
- async unload(reason) {
59
- if (typeof this.script.onUnload === 'function')
60
- await this.script.onUnload(reason, this.client);
61
- }
62
- /**
63
- * Register application commands from this module
64
- * @param guilds Register to certain guilds
65
- */
66
- async registerSlashCommands(...guilds) {
67
- for (const command of this.commands) {
68
- if (command.type !== builders_1.CommandType.SlashCommand)
69
- continue;
70
- await this.client.applicationCommands.add(command, (0, discord_js_1.normalizeArray)(guilds));
71
- }
72
- }
73
- /**
74
- * Unregister application commands from this module
75
- * @param guilds Unregister from certain guilds
76
- */
77
- async unregisterSlashCommands(...guilds) {
78
- for (const builder of this.commands) {
79
- if (builder.type !== builders_1.CommandType.SlashCommand)
80
- continue;
81
- if ((0, discord_js_1.normalizeArray)(guilds).length) {
82
- for (const guild of (0, discord_js_1.normalizeArray)(guilds)) {
83
- const command = this.client.applicationCommands.get(builder, guild);
84
- if (command)
85
- await this.client.applicationCommands.remove(command, guild);
86
- }
87
- continue;
88
- }
89
- const command = this.client.applicationCommands.get(builder);
90
- if (command)
91
- await this.client.applicationCommands.remove(command);
92
- }
93
- }
94
- /**
95
- * Update registered application commands of this module
96
- * @param guilds update commands from certain guilds
97
- */
98
- async updateSlashCommands(...guilds) {
99
- for (const builder of this.commands) {
100
- if (builder.type !== builders_1.CommandType.SlashCommand)
101
- continue;
102
- if ((0, discord_js_1.normalizeArray)(guilds).length) {
103
- for (const guild of (0, discord_js_1.normalizeArray)(guilds)) {
104
- const command = this.client.applicationCommands.get(builder, guild);
105
- if (command)
106
- await this.client.applicationCommands.edit(command, builder, guild);
107
- }
108
- continue;
109
- }
110
- const command = this.client.applicationCommands.get(builder);
111
- if (command)
112
- await this.client.applicationCommands.edit(command, builder);
113
- }
114
- }
115
- /**
116
- * Resolve module commands
117
- */
118
- resolveCommands() {
119
- if (!Array.isArray(this.script?.commands))
120
- return this.commands;
121
- for (const command of this.script.commands) {
122
- if (command?.type !== builders_1.CommandType.SlashCommand && command?.type !== builders_1.CommandType.MessageCommand)
123
- continue;
124
- const builder = command.type === builders_1.CommandType.SlashCommand ? SlashCommandBuilder_1.SlashCommandBuilder.resolveSlashCommand(command) : MessageCommandBuilder_1.MessageCommandBuilder.resolveMessageCommand(command);
125
- if (!(0, util_1.validateCommandBuilder)(builder))
126
- throw new Error('Invalid command builder, no name or contains option(s) without name');
127
- this.commands.push(builder);
128
- }
129
- this.client.commands.add(this.commands);
130
- return this.commands;
131
- }
132
- toString() {
133
- return this.displayName;
134
- }
135
- }
136
- exports.RecipleModule = RecipleModule;
137
- //# sourceMappingURL=RecipleModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RecipleModule.js","sourceRoot":"","sources":["../../../../src/reciple/classes/RecipleModule.ts"],"names":[],"mappings":";;;AAAA,gDAAmF;AACnF,2CAA0E;AAC1E,4EAAyE;AACzE,wEAAqE;AACrE,kCAAiD;AAEjD,wCAAgD;AAChD,mCAAoC;AAuCpC,MAAa,aAAa;IAQtB,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;IAChC,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;IAC/B,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAA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