reciple 5.6.0 → 6.0.0-dev.2

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 (32) hide show
  1. package/dist/cjs/bin.js +9 -10
  2. package/dist/cjs/index.js +7 -6
  3. package/dist/cjs/reciple/classes/RecipleClient.js +87 -181
  4. package/dist/cjs/reciple/classes/RecipleConfig.js +9 -2
  5. package/dist/cjs/reciple/classes/builders/MessageCommandBuilder.js +6 -4
  6. package/dist/cjs/reciple/classes/builders/SlashCommandBuilder.js +14 -22
  7. package/dist/cjs/reciple/classes/managers/ApplicationCommandManager.js +137 -0
  8. package/dist/cjs/reciple/classes/managers/ClientCommandManager.js +60 -0
  9. package/dist/cjs/reciple/classes/managers/ClientModuleManager.js +193 -0
  10. package/dist/cjs/reciple/classes/{CommandCooldownManager.js → managers/CommandCooldownManager.js} +15 -6
  11. package/dist/cjs/reciple/classes/{MessageCommandOptionManager.js → managers/MessageCommandOptionManager.js} +0 -0
  12. package/dist/cjs/reciple/logger.js +10 -8
  13. package/dist/cjs/reciple/permissions.js +3 -4
  14. package/dist/cjs/reciple/util.js +10 -1
  15. package/dist/types/index.d.ts +7 -6
  16. package/dist/types/reciple/classes/RecipleClient.d.ts +17 -65
  17. package/dist/types/reciple/classes/builders/MessageCommandBuilder.d.ts +2 -2
  18. package/dist/types/reciple/classes/builders/SlashCommandBuilder.d.ts +12 -12
  19. package/dist/types/reciple/classes/managers/ApplicationCommandManager.d.ts +20 -0
  20. package/dist/types/reciple/classes/managers/ClientCommandManager.d.ts +37 -0
  21. package/dist/types/reciple/classes/managers/ClientModuleManager.d.ts +79 -0
  22. package/dist/types/reciple/classes/{CommandCooldownManager.d.ts → managers/CommandCooldownManager.d.ts} +3 -2
  23. package/dist/types/reciple/classes/{MessageCommandOptionManager.d.ts → managers/MessageCommandOptionManager.d.ts} +1 -1
  24. package/dist/types/reciple/types/builders.d.ts +13 -13
  25. package/dist/types/reciple/types/commands.d.ts +2 -2
  26. package/dist/types/reciple/types/paramOptions.d.ts +8 -19
  27. package/dist/types/reciple/util.d.ts +2 -0
  28. package/package.json +21 -16
  29. package/dist/cjs/reciple/modules.js +0 -113
  30. package/dist/cjs/reciple/registerApplicationCommands.js +0 -49
  31. package/dist/types/reciple/modules.d.ts +0 -64
  32. package/dist/types/reciple/registerApplicationCommands.d.ts +0 -9
@@ -1,64 +0,0 @@
1
- import { AnyCommandBuilder, AnyCommandData } from './types/builders';
2
- import { RecipleClient } from './classes/RecipleClient';
3
- /**
4
- * Loaded modules and commands
5
- */
6
- export interface LoadedModules {
7
- commands: AnyCommandBuilder[];
8
- modules: RecipleModule[];
9
- }
10
- /**
11
- * Reciple script object
12
- */
13
- export interface RecipleScript {
14
- /**
15
- * Supported reciple versions
16
- */
17
- versions: string | string[];
18
- /**
19
- * Module commands
20
- */
21
- commands?: (AnyCommandBuilder | AnyCommandData)[];
22
- /**
23
- * Action on bot ready
24
- * @param client Bot client
25
- */
26
- onLoad?(client: RecipleClient<true>): void | Promise<void>;
27
- /**
28
- * Action on module start
29
- * @param client Bot client
30
- */
31
- onStart(client: RecipleClient<false>): boolean | Promise<boolean>;
32
- }
33
- /**
34
- * Reciple module object
35
- */
36
- export interface RecipleModule {
37
- /**
38
- * Module script
39
- */
40
- script: RecipleScript;
41
- /**
42
- * Module local information
43
- */
44
- info: {
45
- /**
46
- * Module file name
47
- */
48
- filename?: string;
49
- /**
50
- * Supported reciple versions
51
- */
52
- versions: string[];
53
- /**
54
- * Module local file path
55
- */
56
- path?: string;
57
- };
58
- }
59
- /**
60
- * Load modules from folder
61
- * @param client Reciple client
62
- * @param folder Modules folder
63
- */
64
- export declare function getModules(client: RecipleClient, folder?: string): Promise<LoadedModules>;
@@ -1,9 +0,0 @@
1
- import { ContextMenuCommandBuilder, SlashCommandBuilder as DiscordJsSlashCommandBuilder } from 'discord.js';
2
- import { RegisterApplicationCommandsOptions } from './types/paramOptions';
3
- import { AnySlashCommandBuilder } from './types/builders';
4
- export declare type ApplicationCommandBuilder = AnySlashCommandBuilder | ContextMenuCommandBuilder | DiscordJsSlashCommandBuilder;
5
- /**
6
- * Register application commands
7
- * @param options Register application commands options
8
- */
9
- export declare function registerApplicationCommands(options: RegisterApplicationCommandsOptions): Promise<void>;