reciple 6.0.0-dev.27 → 6.0.0-dev.28

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 (88) hide show
  1. package/LICENSE +674 -674
  2. package/README.md +183 -183
  3. package/dist/lib/bin.mjs +68 -67
  4. package/dist/lib/bin.mjs.map +1 -0
  5. package/dist/lib/esm.mjs +2 -1
  6. package/dist/lib/esm.mjs.map +1 -0
  7. package/dist/lib/index.js +34 -33
  8. package/dist/lib/index.js.map +1 -0
  9. package/dist/lib/reciple/classes/RecipleClient.js +308 -307
  10. package/dist/lib/reciple/classes/RecipleClient.js.map +1 -0
  11. package/dist/lib/reciple/classes/RecipleConfig.js +107 -106
  12. package/dist/lib/reciple/classes/RecipleConfig.js.map +1 -0
  13. package/dist/lib/reciple/classes/RecipleModule.js +111 -94
  14. package/dist/lib/reciple/classes/RecipleModule.js.map +1 -0
  15. package/dist/lib/reciple/classes/builders/MessageCommandBuilder.js +310 -309
  16. package/dist/lib/reciple/classes/builders/MessageCommandBuilder.js.map +1 -0
  17. package/dist/lib/reciple/classes/builders/MessageCommandOptionBuilder.js +127 -126
  18. package/dist/lib/reciple/classes/builders/MessageCommandOptionBuilder.js.map +1 -0
  19. package/dist/lib/reciple/classes/builders/SlashCommandBuilder.js +247 -246
  20. package/dist/lib/reciple/classes/builders/SlashCommandBuilder.js.map +1 -0
  21. package/dist/lib/reciple/classes/managers/ApplicationCommandManager.js +179 -178
  22. package/dist/lib/reciple/classes/managers/ApplicationCommandManager.js.map +1 -0
  23. package/dist/lib/reciple/classes/managers/CommandCooldownManager.js +100 -99
  24. package/dist/lib/reciple/classes/managers/CommandCooldownManager.js.map +1 -0
  25. package/dist/lib/reciple/classes/managers/CommandManager.js +65 -60
  26. package/dist/lib/reciple/classes/managers/CommandManager.js.map +1 -0
  27. package/dist/lib/reciple/classes/managers/MessageCommandOptionManager.js +26 -25
  28. package/dist/lib/reciple/classes/managers/MessageCommandOptionManager.js.map +1 -0
  29. package/dist/lib/reciple/classes/managers/ModuleManager.js +181 -180
  30. package/dist/lib/reciple/classes/managers/ModuleManager.js.map +1 -0
  31. package/dist/lib/reciple/flags.js +32 -31
  32. package/dist/lib/reciple/flags.js.map +1 -0
  33. package/dist/lib/reciple/permissions.js +31 -30
  34. package/dist/lib/reciple/permissions.js.map +1 -0
  35. package/dist/lib/reciple/types/builders.js +12 -11
  36. package/dist/lib/reciple/types/builders.js.map +1 -0
  37. package/dist/lib/reciple/types/commands.js +16 -15
  38. package/dist/lib/reciple/types/commands.js.map +1 -0
  39. package/dist/lib/reciple/types/paramOptions.js +3 -2
  40. package/dist/lib/reciple/types/paramOptions.js.map +1 -0
  41. package/dist/lib/reciple/util.js +72 -71
  42. package/dist/lib/reciple/util.js.map +1 -0
  43. package/dist/lib/reciple/version.js +48 -47
  44. package/dist/lib/reciple/version.js.map +1 -0
  45. package/dist/types/bin.d.mts +3 -2
  46. package/dist/types/bin.d.mts.map +1 -0
  47. package/dist/types/esm.d.mts +2 -1
  48. package/dist/types/esm.d.mts.map +1 -0
  49. package/dist/types/index.d.ts +18 -17
  50. package/dist/types/index.d.ts.map +1 -0
  51. package/dist/types/reciple/classes/RecipleClient.d.ts +115 -114
  52. package/dist/types/reciple/classes/RecipleClient.d.ts.map +1 -0
  53. package/dist/types/reciple/classes/RecipleConfig.d.ts +101 -100
  54. package/dist/types/reciple/classes/RecipleConfig.d.ts.map +1 -0
  55. package/dist/types/reciple/classes/RecipleModule.d.ts +62 -56
  56. package/dist/types/reciple/classes/RecipleModule.d.ts.map +1 -0
  57. package/dist/types/reciple/classes/builders/MessageCommandBuilder.d.ts +190 -189
  58. package/dist/types/reciple/classes/builders/MessageCommandBuilder.d.ts.map +1 -0
  59. package/dist/types/reciple/classes/builders/MessageCommandOptionBuilder.d.ts +54 -53
  60. package/dist/types/reciple/classes/builders/MessageCommandOptionBuilder.d.ts.map +1 -0
  61. package/dist/types/reciple/classes/builders/SlashCommandBuilder.d.ts +99 -98
  62. package/dist/types/reciple/classes/builders/SlashCommandBuilder.d.ts.map +1 -0
  63. package/dist/types/reciple/classes/managers/ApplicationCommandManager.d.ts +54 -53
  64. package/dist/types/reciple/classes/managers/ApplicationCommandManager.d.ts.map +1 -0
  65. package/dist/types/reciple/classes/managers/CommandCooldownManager.d.ts +71 -70
  66. package/dist/types/reciple/classes/managers/CommandCooldownManager.d.ts.map +1 -0
  67. package/dist/types/reciple/classes/managers/CommandManager.d.ts +35 -34
  68. package/dist/types/reciple/classes/managers/CommandManager.d.ts.map +1 -0
  69. package/dist/types/reciple/classes/managers/MessageCommandOptionManager.d.ts +23 -22
  70. package/dist/types/reciple/classes/managers/MessageCommandOptionManager.d.ts.map +1 -0
  71. package/dist/types/reciple/classes/managers/ModuleManager.d.ts +50 -49
  72. package/dist/types/reciple/classes/managers/ModuleManager.d.ts.map +1 -0
  73. package/dist/types/reciple/flags.d.ts +18 -17
  74. package/dist/types/reciple/flags.d.ts.map +1 -0
  75. package/dist/types/reciple/permissions.d.ts +16 -15
  76. package/dist/types/reciple/permissions.d.ts.map +1 -0
  77. package/dist/types/reciple/types/builders.d.ts +206 -205
  78. package/dist/types/reciple/types/builders.d.ts.map +1 -0
  79. package/dist/types/reciple/types/commands.d.ts +82 -81
  80. package/dist/types/reciple/types/commands.d.ts.map +1 -0
  81. package/dist/types/reciple/types/paramOptions.d.ts +102 -101
  82. package/dist/types/reciple/types/paramOptions.d.ts.map +1 -0
  83. package/dist/types/reciple/util.d.ts +27 -26
  84. package/dist/types/reciple/util.d.ts.map +1 -0
  85. package/dist/types/reciple/version.d.ts +26 -25
  86. package/dist/types/reciple/version.d.ts.map +1 -0
  87. package/package.json +8 -6
  88. package/resource/reciple.yml +120 -120
@@ -1,178 +1,179 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ApplicationCommandManager = void 0;
4
- const discord_js_1 = require("discord.js");
5
- const SlashCommandBuilder_1 = require("../builders/SlashCommandBuilder");
6
- class ApplicationCommandManager {
7
- constructor(client) {
8
- this.client = client;
9
- }
10
- get commands() {
11
- return [...this.client.commands.additionalApplicationCommands, ...this.client.commands.slashCommands.toJSON()];
12
- }
13
- get size() {
14
- return this.commands.length;
15
- }
16
- /**
17
- * Sets application commands globally or in guilds
18
- * @param commands Application commands
19
- * @param guilds set only to guilds
20
- */
21
- async set(commands, ...guilds) {
22
- guilds = (0, discord_js_1.normalizeArray)(guilds);
23
- if (!this.client.isReady())
24
- throw new Error('Client is not ready');
25
- if (guilds && guilds.length > 1) {
26
- for (const guild of guilds) {
27
- await this.set(commands, guild);
28
- }
29
- return;
30
- }
31
- let guild = guilds?.shift();
32
- guild = guild ? this.client.guilds.resolveId(guild) || undefined : undefined;
33
- if (!guild) {
34
- await this.client.application.commands.set(commands);
35
- if (!this.client.isClientLogsSilent)
36
- this.client.logger.log(`Registered ${this.client.applicationCommands.size} application command(s) globally...`);
37
- }
38
- else {
39
- await this.client.application.commands.set(commands, guild);
40
- if (!this.client.isClientLogsSilent)
41
- this.client.logger.log(`Registered ${this.client.applicationCommands.size} application command(s) to guild ${guild}`);
42
- }
43
- }
44
- /**
45
- * Add command globally or in guilds
46
- * @param command Application command
47
- * @param guilds add only in guilds
48
- */
49
- async add(command, ...guilds) {
50
- guilds = (0, discord_js_1.normalizeArray)(guilds);
51
- if (!this.client.isReady())
52
- throw new Error('Client is not ready');
53
- if (!command)
54
- throw new Error('Command is undefined');
55
- if (guilds && guilds.length > 1) {
56
- for (const guild of guilds) {
57
- await this.add(command, guild);
58
- }
59
- return;
60
- }
61
- let guild = guilds?.shift();
62
- guild = guild ? this.client.guilds.resolveId(guild) || undefined : undefined;
63
- if (!guild) {
64
- await this.client.application.commands.create(command);
65
- if (!this.client.isClientLogsSilent)
66
- this.client.logger.log(`Created application command '${command.name}' globally`);
67
- }
68
- else {
69
- await this.client.application.commands.create(command, guild);
70
- if (!this.client.isClientLogsSilent)
71
- this.client.logger.log(`Created application command '${command.name}' to guild ${guild}`);
72
- }
73
- }
74
- /**
75
- * Remove application command globally or in guilds
76
- * @param command id of application commmand or ApplicationCommand class
77
- * @param guilds Remove from guilds
78
- */
79
- async remove(command, ...guilds) {
80
- guilds = (0, discord_js_1.normalizeArray)(guilds);
81
- if (!this.client.isReady())
82
- throw new Error('Client is not ready');
83
- if (!command)
84
- throw new Error('Command is undefined');
85
- if (guilds && guilds.length > 1) {
86
- for (const guild of guilds) {
87
- await this.remove(command, guild);
88
- }
89
- return;
90
- }
91
- let guild = guilds?.shift();
92
- guild = guild ? this.client.guilds.resolveId(guild) || undefined : undefined;
93
- if (!guild) {
94
- await this.client.application.commands.delete(command);
95
- if (!this.client.isClientLogsSilent)
96
- this.client.logger.log(`Removed application command '${typeof command === 'string' ? command : command.name}' globally`);
97
- }
98
- else {
99
- await this.client.application.commands.delete(command, guild);
100
- if (!this.client.isClientLogsSilent)
101
- this.client.logger.log(`Removed application command '${typeof command === 'string' ? command : command.name}' from guild ${guild}`);
102
- }
103
- }
104
- /**
105
- * Edit application command globally or in guilds
106
- * @param command id of application command or ApplicationCommand class
107
- * @param newCommand new application command data
108
- * @param guilds Edit only from guilds
109
- */
110
- async edit(command, newCommand, ...guilds) {
111
- guilds = (0, discord_js_1.normalizeArray)(guilds);
112
- if (!this.client.isReady())
113
- throw new Error('Client is not ready');
114
- if (!command)
115
- throw new Error('Command is undefined');
116
- if (guilds && guilds.length > 1) {
117
- for (const guild of guilds) {
118
- await this.edit(command, newCommand, guild);
119
- }
120
- return;
121
- }
122
- let guild = guilds?.shift();
123
- guild = guild ? this.client.guilds.resolveId(guild) || undefined : undefined;
124
- if (!guild) {
125
- await this.client.application.commands.edit(command, newCommand);
126
- if (!this.client.isClientLogsSilent)
127
- this.client.logger.log(`Removed application command '${typeof command === 'string' ? command : command.name}' globally`);
128
- }
129
- else {
130
- await this.client.application.commands.edit(command, newCommand, guild);
131
- if (!this.client.isClientLogsSilent)
132
- this.client.logger.log(`Removed application command '${typeof command === 'string' ? command : command.name}' from guild ${guild}`);
133
- }
134
- }
135
- /**
136
- * Get application command from cache by application command data, builder, id, or name globally or from guid
137
- * @param command application command data, builder, id, or name
138
- * @param guild get command from guild
139
- */
140
- get(command, guild) {
141
- const commands = guild ? this.client.guilds.resolve(guild)?.commands.cache : this.client.application?.commands.cache;
142
- if (!commands)
143
- throw new Error('Guild not found in cache');
144
- return commands.find(cmd => (typeof command === 'string' ? cmd.id === command || cmd.name === command : cmd.name === command.name || (command instanceof discord_js_1.ApplicationCommand && cmd.id === command.id)));
145
- }
146
- /**
147
- * Fetch application command by id globally or from guild
148
- * @param commandId command id
149
- * @param guild fetch from guild
150
- */
151
- async fetch(commandId, guild) {
152
- const manager = guild ? this.client.guilds.resolve(guild)?.commands : this.client.application?.commands;
153
- if (!manager)
154
- throw new Error('Guild not found in cache');
155
- return manager.fetch(commandId);
156
- }
157
- /**
158
- * Parse application command builders to command data
159
- * @param commands Application command builders
160
- * @param setPermissions set slash commands permissions
161
- */
162
- parseCommands(commands, setPermissions = true) {
163
- return commands.map(cmd => {
164
- if (cmd?.toJSON === undefined)
165
- return cmd;
166
- if (SlashCommandBuilder_1.SlashCommandBuilder.isSlashCommandBuilder(cmd) && this.client.config.commands.slashCommand.setRequiredPermissions) {
167
- const permissions = setPermissions || this.client.config.commands.slashCommand.permissions.enabled ? this.client.config.commands.slashCommand.permissions.commands.find(cmd_ => cmd_.command.toLowerCase() === cmd.name.toLowerCase())?.permissions : undefined;
168
- if (permissions) {
169
- cmd.setRequiredMemberPermissions(...permissions);
170
- if (!this.client.isClientLogsSilent)
171
- this.client.logger.debug(`Set required permissions for ${cmd.name}`);
172
- }
173
- }
174
- return cmd.toJSON();
175
- });
176
- }
177
- }
178
- exports.ApplicationCommandManager = ApplicationCommandManager;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApplicationCommandManager = void 0;
4
+ const discord_js_1 = require("discord.js");
5
+ const SlashCommandBuilder_1 = require("../builders/SlashCommandBuilder");
6
+ class ApplicationCommandManager {
7
+ constructor(client) {
8
+ this.client = client;
9
+ }
10
+ get commands() {
11
+ return [...this.client.commands.additionalApplicationCommands, ...this.client.commands.slashCommands.toJSON()];
12
+ }
13
+ get size() {
14
+ return this.commands.length;
15
+ }
16
+ /**
17
+ * Sets application commands globally or in guilds
18
+ * @param commands Application commands
19
+ * @param guilds set only to guilds
20
+ */
21
+ async set(commands, ...guilds) {
22
+ guilds = (0, discord_js_1.normalizeArray)(guilds);
23
+ if (!this.client.isReady())
24
+ throw new Error('Client is not ready');
25
+ if (guilds && guilds.length > 1) {
26
+ for (const guild of guilds) {
27
+ await this.set(commands, guild);
28
+ }
29
+ return;
30
+ }
31
+ let guild = guilds?.shift();
32
+ guild = guild ? this.client.guilds.resolveId(guild) || undefined : undefined;
33
+ if (!guild) {
34
+ await this.client.application.commands.set(commands);
35
+ if (!this.client.isClientLogsSilent)
36
+ this.client.logger.log(`Registered ${this.client.applicationCommands.size} application command(s) globally...`);
37
+ }
38
+ else {
39
+ await this.client.application.commands.set(commands, guild);
40
+ if (!this.client.isClientLogsSilent)
41
+ this.client.logger.log(`Registered ${this.client.applicationCommands.size} application command(s) to guild ${guild}`);
42
+ }
43
+ }
44
+ /**
45
+ * Add command globally or in guilds
46
+ * @param command Application command
47
+ * @param guilds add only in guilds
48
+ */
49
+ async add(command, ...guilds) {
50
+ guilds = (0, discord_js_1.normalizeArray)(guilds);
51
+ if (!this.client.isReady())
52
+ throw new Error('Client is not ready');
53
+ if (!command)
54
+ throw new Error('Command is undefined');
55
+ if (guilds && guilds.length > 1) {
56
+ for (const guild of guilds) {
57
+ await this.add(command, guild);
58
+ }
59
+ return;
60
+ }
61
+ let guild = guilds?.shift();
62
+ guild = guild ? this.client.guilds.resolveId(guild) || undefined : undefined;
63
+ if (!guild) {
64
+ const newCommand = await this.client.application.commands.create(command);
65
+ if (!this.client.isClientLogsSilent)
66
+ this.client.logger.log(`Created application command '${newCommand.name}' globally`);
67
+ }
68
+ else {
69
+ const newCommand = await this.client.application.commands.create(command, guild);
70
+ if (!this.client.isClientLogsSilent)
71
+ this.client.logger.log(`Created application command '${newCommand.name}' to guild ${guild}`);
72
+ }
73
+ }
74
+ /**
75
+ * Remove application command globally or in guilds
76
+ * @param command id of application commmand or ApplicationCommand class
77
+ * @param guilds Remove from guilds
78
+ */
79
+ async remove(command, ...guilds) {
80
+ guilds = (0, discord_js_1.normalizeArray)(guilds);
81
+ if (!this.client.isReady())
82
+ throw new Error('Client is not ready');
83
+ if (!command)
84
+ throw new Error('Command is undefined');
85
+ if (guilds && guilds.length > 1) {
86
+ for (const guild of guilds) {
87
+ await this.remove(command, guild);
88
+ }
89
+ return;
90
+ }
91
+ let guild = guilds?.shift();
92
+ guild = guild ? this.client.guilds.resolveId(guild) || undefined : undefined;
93
+ if (!guild) {
94
+ await this.client.application.commands.delete(command);
95
+ if (!this.client.isClientLogsSilent)
96
+ this.client.logger.log(`Removed application command '${typeof command === 'string' ? command : command.name}' globally`);
97
+ }
98
+ else {
99
+ await this.client.application.commands.delete(command, guild);
100
+ if (!this.client.isClientLogsSilent)
101
+ this.client.logger.log(`Removed application command '${typeof command === 'string' ? command : command.name}' from guild ${guild}`);
102
+ }
103
+ }
104
+ /**
105
+ * Edit application command globally or in guilds
106
+ * @param command id of application command or ApplicationCommand class
107
+ * @param newCommand new application command data
108
+ * @param guilds Edit only from guilds
109
+ */
110
+ async edit(command, newCommand, ...guilds) {
111
+ guilds = (0, discord_js_1.normalizeArray)(guilds);
112
+ if (!this.client.isReady())
113
+ throw new Error('Client is not ready');
114
+ if (!command)
115
+ throw new Error('Command is undefined');
116
+ if (guilds && guilds.length > 1) {
117
+ for (const guild of guilds) {
118
+ await this.edit(command, newCommand, guild);
119
+ }
120
+ return;
121
+ }
122
+ let guild = guilds?.shift();
123
+ guild = guild ? this.client.guilds.resolveId(guild) || undefined : undefined;
124
+ if (!guild) {
125
+ await this.client.application.commands.edit(command, newCommand);
126
+ if (!this.client.isClientLogsSilent)
127
+ this.client.logger.log(`Removed application command '${typeof command === 'string' ? command : command.name}' globally`);
128
+ }
129
+ else {
130
+ await this.client.application.commands.edit(command, newCommand, guild);
131
+ if (!this.client.isClientLogsSilent)
132
+ this.client.logger.log(`Removed application command '${typeof command === 'string' ? command : command.name}' from guild ${guild}`);
133
+ }
134
+ }
135
+ /**
136
+ * Get application command from cache by application command data, builder, id, or name globally or from guid
137
+ * @param command application command data, builder, id, or name
138
+ * @param guild get command from guild
139
+ */
140
+ get(command, guild) {
141
+ const commands = guild ? this.client.guilds.resolve(guild)?.commands.cache : this.client.application?.commands.cache;
142
+ if (!commands)
143
+ throw new Error('Guild not found in cache');
144
+ return commands.find(cmd => (typeof command === 'string' ? cmd.id === command || cmd.name === command : cmd.name === command.name || (command instanceof discord_js_1.ApplicationCommand && cmd.id === command.id)));
145
+ }
146
+ /**
147
+ * Fetch application command by id globally or from guild
148
+ * @param commandId command id
149
+ * @param guild fetch from guild
150
+ */
151
+ async fetch(commandId, guild) {
152
+ const manager = guild ? this.client.guilds.resolve(guild)?.commands : this.client.application?.commands;
153
+ if (!manager)
154
+ throw new Error('Guild not found in cache');
155
+ return manager.fetch(commandId);
156
+ }
157
+ /**
158
+ * Parse application command builders to command data
159
+ * @param commands Application command builders
160
+ * @param setPermissions set slash commands permissions
161
+ */
162
+ parseCommands(commands, setPermissions = true) {
163
+ return commands.map(cmd => {
164
+ if (cmd?.toJSON === undefined)
165
+ return cmd;
166
+ if (SlashCommandBuilder_1.SlashCommandBuilder.isSlashCommandBuilder(cmd) && this.client.config.commands.slashCommand.setRequiredPermissions) {
167
+ const permissions = setPermissions || this.client.config.commands.slashCommand.permissions.enabled ? this.client.config.commands.slashCommand.permissions.commands.find(cmd_ => cmd_.command.toLowerCase() === cmd.name.toLowerCase())?.permissions : undefined;
168
+ if (permissions) {
169
+ cmd.setRequiredMemberPermissions(...permissions);
170
+ if (!this.client.isClientLogsSilent)
171
+ this.client.logger.debug(`Set required permissions for ${cmd.name}`);
172
+ }
173
+ }
174
+ return cmd.toJSON();
175
+ });
176
+ }
177
+ }
178
+ exports.ApplicationCommandManager = ApplicationCommandManager;
179
+ //# sourceMappingURL=ApplicationCommandManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApplicationCommandManager.js","sourceRoot":"","sources":["../../../../../src/reciple/classes/managers/ApplicationCommandManager.ts"],"names":[],"mappings":";;;AAAA,2CAAgR;AAChR,yEAAsE;AAMtE,MAAa,yBAAyB;IAWlC,YAAY,MAAqB;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAVD,IAAI,QAAQ;QACR,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,6BAA6B,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC;IACnH,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;IAChC,CAAC;IAMD;;;;OAIG;IACI,KAAK,CAAC,GAAG,CAAC,QAA0E,EAAE,GAAG,MAAoC;QAChI,MAAM,GAAG,IAAA,2BAAc,EAAC,MAAM,CAAC,CAAC;QAEhC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QACnE,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;YAC7B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;gBACxB,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;aACnC;YAED,OAAO;SACV;QAED,IAAI,KAAK,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC;QAC5B,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,CAAC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,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,sBAAsB,EAAE;gBACnH,MAAM,WAAW,GAAG,cAAc,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;gBAEhQ,IAAI,WAAW,EAAE;oBACb,GAAG,CAAC,4BAA4B,CAAC,GAAG,WAAW,CAAC,CAAC;oBACjD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB;wBAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAgC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;iBAC7G;aACJ;YAED,OAAQ,GAAiC,CAAC,MAAM,EAAE,CAAC;QACvD,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AApLD,8DAoLC"}
@@ -1,99 +1,100 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CommandCooldownManager = void 0;
4
- const discord_js_1 = require("discord.js");
5
- /**
6
- * cooled-down users manager
7
- */
8
- class CommandCooldownManager extends Array {
9
- constructor(...data) {
10
- super(...(0, discord_js_1.normalizeArray)(data));
11
- }
12
- /**
13
- * Alias for `CommandCooldownManager#push()`
14
- * @param options Cooled-down user data
15
- */
16
- add(...options) {
17
- return this.push(...options);
18
- }
19
- /**
20
- * Remove cooldown from specific user, channel or guild
21
- * @param options Remove cooldown data options
22
- * @param limit Remove cooldown data limit
23
- * @returns Returns the removed values
24
- */
25
- remove(options, limit = 0) {
26
- if (!Object.keys(options).length)
27
- throw new TypeError('Provide atleast one option to remove cooldown data.');
28
- const removed = [];
29
- for (let i = 0; i < this.length; i++) {
30
- if (!CommandCooldownManager.checkOptions(options, this[i]))
31
- continue;
32
- if (options.expireTime && this[i].expireTime > Date.now())
33
- continue;
34
- if (limit && i >= limit)
35
- continue;
36
- removed.push(this[i]);
37
- this.splice(Number(i));
38
- }
39
- return removed;
40
- }
41
- /**
42
- * Check if the given user is cooled-down
43
- * @param options Options to identify if user is on cooldown
44
- */
45
- isCooledDown(options) {
46
- const data = this.get(options);
47
- if (!data)
48
- return false;
49
- this.remove({
50
- ...data,
51
- channel: undefined,
52
- guild: undefined,
53
- type: undefined,
54
- command: undefined,
55
- });
56
- if (data.expireTime < Date.now())
57
- return false;
58
- return true;
59
- }
60
- /**
61
- * Purge non cooled-down users from this array
62
- * @param options Clean cooldown options
63
- */
64
- clean(options) {
65
- for (const index in this) {
66
- if (options && !CommandCooldownManager.checkOptions(options, this[index]))
67
- return;
68
- if (this[index].expireTime > Date.now())
69
- return;
70
- this.slice(Number(index));
71
- }
72
- }
73
- /**
74
- * Get someone's cooldown data
75
- * @param options Get cooldown data options
76
- */
77
- get(options) {
78
- return this.find(data => CommandCooldownManager.checkOptions(options, data));
79
- }
80
- /**
81
- * Check if the options are valid
82
- * @param options Options to validated
83
- * @param data Cooled-down user data
84
- */
85
- static checkOptions(options, data) {
86
- if (options?.user !== undefined && options.user.id !== data.user.id)
87
- return false;
88
- if (options?.guild !== undefined && options.guild?.id !== data.guild?.id)
89
- return false;
90
- if (options?.channel !== undefined && options.channel.id !== data.channel?.id)
91
- return false;
92
- if (options?.command !== undefined && options.command !== data.command)
93
- return false;
94
- if (options?.type !== undefined && options.type !== data.type)
95
- return false;
96
- return true;
97
- }
98
- }
99
- exports.CommandCooldownManager = CommandCooldownManager;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CommandCooldownManager = void 0;
4
+ const discord_js_1 = require("discord.js");
5
+ /**
6
+ * cooled-down users manager
7
+ */
8
+ class CommandCooldownManager extends Array {
9
+ constructor(...data) {
10
+ super(...(0, discord_js_1.normalizeArray)(data));
11
+ }
12
+ /**
13
+ * Alias for `CommandCooldownManager#push()`
14
+ * @param options Cooled-down user data
15
+ */
16
+ add(...options) {
17
+ return this.push(...options);
18
+ }
19
+ /**
20
+ * Remove cooldown from specific user, channel or guild
21
+ * @param options Remove cooldown data options
22
+ * @param limit Remove cooldown data limit
23
+ * @returns Returns the removed values
24
+ */
25
+ remove(options, limit = 0) {
26
+ if (!Object.keys(options).length)
27
+ throw new TypeError('Provide atleast one option to remove cooldown data.');
28
+ const removed = [];
29
+ for (let i = 0; i < this.length; i++) {
30
+ if (!CommandCooldownManager.checkOptions(options, this[i]))
31
+ continue;
32
+ if (options.expireTime && this[i].expireTime > Date.now())
33
+ continue;
34
+ if (limit && i >= limit)
35
+ continue;
36
+ removed.push(this[i]);
37
+ this.splice(Number(i));
38
+ }
39
+ return removed;
40
+ }
41
+ /**
42
+ * Check if the given user is cooled-down
43
+ * @param options Options to identify if user is on cooldown
44
+ */
45
+ isCooledDown(options) {
46
+ const data = this.get(options);
47
+ if (!data)
48
+ return false;
49
+ this.remove({
50
+ ...data,
51
+ channel: undefined,
52
+ guild: undefined,
53
+ type: undefined,
54
+ command: undefined,
55
+ });
56
+ if (data.expireTime < Date.now())
57
+ return false;
58
+ return true;
59
+ }
60
+ /**
61
+ * Purge non cooled-down users from this array
62
+ * @param options Clean cooldown options
63
+ */
64
+ clean(options) {
65
+ for (const index in this) {
66
+ if (options && !CommandCooldownManager.checkOptions(options, this[index]))
67
+ return;
68
+ if (this[index].expireTime > Date.now())
69
+ return;
70
+ this.slice(Number(index));
71
+ }
72
+ }
73
+ /**
74
+ * Get someone's cooldown data
75
+ * @param options Get cooldown data options
76
+ */
77
+ get(options) {
78
+ return this.find(data => CommandCooldownManager.checkOptions(options, data));
79
+ }
80
+ /**
81
+ * Check if the options are valid
82
+ * @param options Options to validated
83
+ * @param data Cooled-down user data
84
+ */
85
+ static checkOptions(options, data) {
86
+ if (options?.user !== undefined && options.user.id !== data.user.id)
87
+ return false;
88
+ if (options?.guild !== undefined && options.guild?.id !== data.guild?.id)
89
+ return false;
90
+ if (options?.channel !== undefined && options.channel.id !== data.channel?.id)
91
+ return false;
92
+ if (options?.command !== undefined && options.command !== data.command)
93
+ return false;
94
+ if (options?.type !== undefined && options.type !== data.type)
95
+ return false;
96
+ return true;
97
+ }
98
+ }
99
+ exports.CommandCooldownManager = CommandCooldownManager;
100
+ //# sourceMappingURL=CommandCooldownManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandCooldownManager.js","sourceRoot":"","sources":["../../../../../src/reciple/classes/managers/CommandCooldownManager.ts"],"names":[],"mappings":";;;AAAA,2CAAwF;AAiCxF;;GAEG;AACH,MAAa,sBAAuB,SAAQ,KAAqB;IAC7D,YAAY,GAAG,IAAiC;QAC5C,KAAK,CAAC,GAAG,IAAA,2BAAc,EAAC,IAAI,CAAC,CAAC,CAAC;IACnC,CAAC;IAED;;;OAGG;IACI,GAAG,CAAC,GAAG,OAAyB;QACnC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,OAAgC,EAAE,QAAgB,CAAC;QAC7D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM;YAAE,MAAM,IAAI,SAAS,CAAC,qDAAqD,CAAC,CAAC;QAE7G,MAAM,OAAO,GAAqB,EAAE,CAAC;QAErC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAClC,IAAI,CAAC,sBAAsB,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;gBAAE,SAAS;YACrE,IAAI,OAAO,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC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