reciple 3.0.1 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +22 -6
  2. package/bin/bin.js +3 -3
  3. package/bin/index.d.ts +3 -3
  4. package/bin/index.js +3 -3
  5. package/bin/reciple/classes/CommandCooldownManager.d.ts +15 -1
  6. package/bin/reciple/classes/CommandCooldownManager.js +12 -1
  7. package/bin/reciple/classes/MessageCommandOptionManager.d.ts +10 -0
  8. package/bin/reciple/classes/MessageCommandOptionManager.js +6 -0
  9. package/bin/reciple/classes/RecipleClient.d.ts +49 -15
  10. package/bin/reciple/classes/RecipleClient.js +66 -24
  11. package/bin/reciple/classes/RecipleConfig.d.ts +14 -1
  12. package/bin/reciple/classes/RecipleConfig.js +10 -2
  13. package/bin/reciple/classes/builders/InteractionCommandBuilder.d.ts +24 -9
  14. package/bin/reciple/classes/builders/InteractionCommandBuilder.js +22 -7
  15. package/bin/reciple/classes/builders/MessageCommandBuilder.d.ts +36 -12
  16. package/bin/reciple/classes/builders/MessageCommandBuilder.js +60 -37
  17. package/bin/reciple/classes/builders/MessageCommandOptionBuilder.d.ts +7 -0
  18. package/bin/reciple/classes/builders/MessageCommandOptionBuilder.js +7 -0
  19. package/bin/reciple/logger.d.ts +11 -0
  20. package/bin/reciple/logger.js +19 -3
  21. package/bin/reciple/modules.d.ts +11 -3
  22. package/bin/reciple/modules.js +4 -2
  23. package/bin/reciple/permissions.d.ts +8 -3
  24. package/bin/reciple/permissions.js +12 -8
  25. package/bin/reciple/registerInteractionCommands.d.ts +4 -3
  26. package/bin/reciple/registerInteractionCommands.js +7 -5
  27. package/bin/reciple/types/builders.d.ts +13 -4
  28. package/bin/reciple/types/builders.js +3 -0
  29. package/bin/reciple/types/commands.d.ts +20 -14
  30. package/bin/reciple/types/commands.js +3 -0
  31. package/bin/reciple/types/paramOptions.d.ts +14 -7
  32. package/bin/reciple/version.d.ts +6 -5
  33. package/bin/reciple/version.js +5 -3
  34. package/package.json +26 -21
  35. package/resource/reciple.yml +20 -17
@@ -1,15 +1,21 @@
1
- import { RecipleCommandBuilders } from './types/builders';
2
1
  import { RecipleClient } from './classes/RecipleClient';
2
+ import { RecipleCommandBuilder } from './types/builders';
3
3
  export declare type LoadedModules = {
4
- commands: RecipleCommandBuilders[];
4
+ commands: RecipleCommandBuilder[];
5
5
  modules: RecipleModule[];
6
6
  };
7
+ /**
8
+ * Reciple script object interface
9
+ */
7
10
  export declare class RecipleScript {
8
11
  versions: string | string[];
9
- commands?: RecipleCommandBuilders[];
12
+ commands?: RecipleCommandBuilder[];
10
13
  onLoad?(reciple: RecipleClient): void | Promise<void>;
11
14
  onStart(reciple: RecipleClient): boolean | Promise<boolean>;
12
15
  }
16
+ /**
17
+ * Reciple module object interface
18
+ */
13
19
  export interface RecipleModule {
14
20
  script: RecipleScript;
15
21
  info: {
@@ -20,5 +26,7 @@ export interface RecipleModule {
20
26
  }
21
27
  /**
22
28
  * Load modules from folder
29
+ * @param client Reciple client
30
+ * @param folder Modules folder
23
31
  */
24
32
  export declare function loadModules(client: RecipleClient, folder?: string): Promise<LoadedModules>;
@@ -14,12 +14,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.loadModules = void 0;
16
16
  const builders_1 = require("./types/builders");
17
- const fs_1 = require("fs");
18
17
  const version_1 = require("./version");
19
- const wildcard_match_1 = __importDefault(require("wildcard-match"));
18
+ const fs_1 = require("fs");
20
19
  const path_1 = __importDefault(require("path"));
20
+ const wildcard_match_1 = __importDefault(require("wildcard-match"));
21
21
  /**
22
22
  * Load modules from folder
23
+ * @param client Reciple client
24
+ * @param folder Modules folder
23
25
  */
24
26
  function loadModules(client, folder) {
25
27
  var _a, _b;
@@ -1,15 +1,20 @@
1
- import { Guild, PermissionResolvable, PermissionsBitField } from 'discord.js';
2
- import { RecipleCommandBuilders } from './types/builders';
3
1
  import { Config } from './classes/RecipleConfig';
2
+ import { RecipleUserHasCommandPermissionsOptions } from './types/paramOptions';
3
+ import { Guild, PermissionResolvable } from 'discord.js';
4
4
  /**
5
5
  * Check if the user has permissions to execute the given command name
6
+ * @param options options
6
7
  */
7
- export declare function userHasCommandPermissions(commandName: string, memberPermissions?: PermissionsBitField, configConmmandPermissions?: Config['commands']['messageCommand']['permissions'] | Config['commands']['interactionCommand']['permissions'], builder?: RecipleCommandBuilders): boolean;
8
+ export declare function userHasCommandPermissions(options: RecipleUserHasCommandPermissionsOptions): boolean;
8
9
  /**
9
10
  * Check if the bot has the required permissions in a guild
11
+ * @param guild Guild
12
+ * @param requiredPermissions Required guild bot permissions
10
13
  */
11
14
  export declare function botHasExecutePermissions(guild?: Guild, requiredPermissions?: PermissionResolvable[]): boolean;
12
15
  /**
13
16
  * Check if the channel id is ignored in config file
17
+ * @param channelId Check if channel id is in ignore list
18
+ * @param ignoredChannelsConfig Ignored channels config
14
19
  */
15
20
  export declare function isIgnoredChannel(channelId: string, ignoredChannelsConfig?: Config["ignoredChannels"]): boolean;
@@ -3,29 +3,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isIgnoredChannel = exports.botHasExecutePermissions = exports.userHasCommandPermissions = void 0;
4
4
  /**
5
5
  * Check if the user has permissions to execute the given command name
6
+ * @param options options
6
7
  */
7
- function userHasCommandPermissions(commandName, memberPermissions, configConmmandPermissions, builder) {
8
- var _a, _b;
9
- if (!(configConmmandPermissions === null || configConmmandPermissions === void 0 ? void 0 : configConmmandPermissions.enabled))
10
- return true;
11
- const command = (_a = configConmmandPermissions.commands.find(c => c.command.toLowerCase() === commandName.toLowerCase())) !== null && _a !== void 0 ? _a : { permissions: (_b = builder === null || builder === void 0 ? void 0 : builder.RequiredUserPermissions) !== null && _b !== void 0 ? _b : [] };
8
+ function userHasCommandPermissions(options) {
9
+ var _a, _b, _c;
10
+ const command = (_c = (((_a = options.commandPermissions) === null || _a === void 0 ? void 0 : _a.enabled)
11
+ ? (_b = options.commandPermissions) === null || _b === void 0 ? void 0 : _b.commands.find(c => c.command.toLowerCase() === options.builder.name.toLowerCase())
12
+ : null)) !== null && _c !== void 0 ? _c : { permissions: options.builder.requiredMemberPermissions };
12
13
  if (!command.permissions.length)
13
14
  return true;
14
- return memberPermissions ? memberPermissions.has(command.permissions) : false;
15
+ return options.memberPermissions ? options.memberPermissions.has(command.permissions) : false;
15
16
  }
16
17
  exports.userHasCommandPermissions = userHasCommandPermissions;
17
18
  /**
18
19
  * Check if the bot has the required permissions in a guild
20
+ * @param guild Guild
21
+ * @param requiredPermissions Required guild bot permissions
19
22
  */
20
23
  function botHasExecutePermissions(guild, requiredPermissions) {
21
- var _a;
22
24
  if (!(requiredPermissions === null || requiredPermissions === void 0 ? void 0 : requiredPermissions.length))
23
25
  return true;
24
- return (guild === null || guild === void 0 ? void 0 : guild.members.me) ? (_a = guild.members.me) === null || _a === void 0 ? void 0 : _a.permissions.has(requiredPermissions) : false;
26
+ return (guild === null || guild === void 0 ? void 0 : guild.members.me) ? guild.members.me.permissions.has(requiredPermissions) : false;
25
27
  }
26
28
  exports.botHasExecutePermissions = botHasExecutePermissions;
27
29
  /**
28
30
  * Check if the channel id is ignored in config file
31
+ * @param channelId Check if channel id is in ignore list
32
+ * @param ignoredChannelsConfig Ignored channels config
29
33
  */
30
34
  function isIgnoredChannel(channelId, ignoredChannelsConfig) {
31
35
  if (!(ignoredChannelsConfig === null || ignoredChannelsConfig === void 0 ? void 0 : ignoredChannelsConfig.enabled))
@@ -1,8 +1,9 @@
1
1
  import { InteractionCommandBuilder } from './classes/builders/InteractionCommandBuilder';
2
+ import { RecipleRegisterInteractionCommandsOptions } from './types/paramOptions';
2
3
  import { ContextMenuCommandBuilder, SlashCommandBuilder } from '@discordjs/builders';
3
- import { RegisterInteractionCommandsOptions } from './types/paramOptions';
4
- export declare type InteractionBuilder = ContextMenuCommandBuilder | InteractionCommandBuilder | SlashCommandBuilder;
4
+ export declare type ApplicationCommandBuilder = InteractionCommandBuilder | ContextMenuCommandBuilder | SlashCommandBuilder;
5
5
  /**
6
6
  * Register interaction commands
7
+ * @param options Register interaction commands options
7
8
  */
8
- export declare function registerInteractionCommands(options: RegisterInteractionCommandsOptions): Promise<void>;
9
+ export declare function registerInteractionCommands(options: RecipleRegisterInteractionCommandsOptions): Promise<void>;
@@ -13,6 +13,7 @@ exports.registerInteractionCommands = void 0;
13
13
  const InteractionCommandBuilder_1 = require("./classes/builders/InteractionCommandBuilder");
14
14
  /**
15
15
  * Register interaction commands
16
+ * @param options Register interaction commands options
16
17
  */
17
18
  function registerInteractionCommands(options) {
18
19
  var _a, _b, _c, _d;
@@ -20,15 +21,16 @@ function registerInteractionCommands(options) {
20
21
  const client = options.client;
21
22
  const guilds = typeof options.guilds == 'string' ? [options.guilds] : options.guilds;
22
23
  const commands = (_b = Object.values((_a = options.commands) !== null && _a !== void 0 ? _a : client.commands.interactionCommands).map(cmd => {
23
- var _a, _b;
24
+ var _a;
24
25
  if (typeof (cmd === null || cmd === void 0 ? void 0 : cmd.toJSON) == 'undefined')
25
26
  return cmd;
26
27
  cmd = cmd;
27
28
  if (cmd instanceof InteractionCommandBuilder_1.InteractionCommandBuilder && client.config.commands.interactionCommand.setRequiredPermissions) {
28
- const permissions = (_b = (client.config.commands.interactionCommand.permissions.enabled ?
29
- (_a = client.config.commands.interactionCommand.permissions.commands.find(cmd_ => cmd_.command.toLowerCase() === cmd.name.toLowerCase())) === null || _a === void 0 ? void 0 : _a.permissions :
30
- undefined)) !== null && _b !== void 0 ? _b : cmd.requiredBotPermissions;
31
- cmd.setRequiredMemberPermissions(permissions);
29
+ const permissions = client.config.commands.interactionCommand.permissions.enabled
30
+ ? (_a = client.config.commands.interactionCommand.permissions.commands.find(cmd_ => cmd_.command.toLowerCase() === cmd.name.toLowerCase())) === null || _a === void 0 ? void 0 : _a.permissions
31
+ : undefined;
32
+ if (permissions)
33
+ cmd.setRequiredMemberPermissions(...permissions);
32
34
  client.commands.interactionCommands[cmd.name] = cmd;
33
35
  if (client.isClientLogsEnabled())
34
36
  client.logger.debug(`Set required permissions for ${cmd.name}`);
@@ -1,7 +1,16 @@
1
- import { InteractionCommandBuilder, RecipleInteractionCommandExecuteData } from '../classes/builders/InteractionCommandBuilder';
2
- import { MessageCommandBuilder, RecipleMessageCommandExecuteData } from '../classes/builders/MessageCommandBuilder';
3
- export declare type RecipleCommandBuilders = MessageCommandBuilder | InteractionCommandBuilder;
4
- export declare type RecipleCommandBuildersExecuteData = RecipleInteractionCommandExecuteData | RecipleMessageCommandExecuteData;
1
+ import { InteractionCommandBuilder, InteractionCommandExecuteData } from '../classes/builders/InteractionCommandBuilder';
2
+ import { MessageCommandBuilder, MessageCommandExecuteData } from '../classes/builders/MessageCommandBuilder';
3
+ /**
4
+ * Reciple command builders
5
+ */
6
+ export declare type RecipleCommandBuilder = MessageCommandBuilder | InteractionCommandBuilder;
7
+ /**
8
+ * Reciple command builders execute data
9
+ */
10
+ export declare type RecipleCommandBuildersExecuteData = InteractionCommandExecuteData | MessageCommandExecuteData;
11
+ /**
12
+ * Types of Reciple command builders
13
+ */
5
14
  export declare enum RecipleCommandBuilderType {
6
15
  MessageCommand = 0,
7
16
  InteractionCommand = 1
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RecipleCommandBuilderType = void 0;
4
+ /**
5
+ * Types of Reciple command builders
6
+ */
4
7
  var RecipleCommandBuilderType;
5
8
  (function (RecipleCommandBuilderType) {
6
9
  RecipleCommandBuilderType[RecipleCommandBuilderType["MessageCommand"] = 0] = "MessageCommand";
@@ -1,33 +1,39 @@
1
- import { InteractionCommandBuilder, RecipleInteractionCommandExecuteData } from '../classes/builders/InteractionCommandBuilder';
2
- import { RecipleMessageCommandExecuteData } from '../classes/builders/MessageCommandBuilder';
3
- import { MessageCommandOptionManager } from '../classes/MessageCommandOptionManager';
1
+ import { InteractionCommandBuilder, InteractionCommandExecuteData } from '../classes/builders/InteractionCommandBuilder';
2
+ import { MessageCommandExecuteData } from '../classes/builders/MessageCommandBuilder';
4
3
  import { CooledDownUser } from '../classes/CommandCooldownManager';
5
- import { RecipleCommandBuilders } from '../types/builders';
6
- export declare type RecipleHaltedCommandData<Builder extends RecipleCommandBuilders> = CommandErrorData<Builder> | CommandCooldownData<Builder> | (Builder extends InteractionCommandBuilder ? never : CommandInvalidArguments<Builder> | CommandMissingArguments<Builder>) | CommandMissingMemberPermissions<Builder> | CommandMissingBotPermissions<Builder>;
7
- export interface CommandHaltBaseData<Builder extends RecipleCommandBuilders> {
8
- executeData: Builder extends InteractionCommandBuilder ? RecipleInteractionCommandExecuteData : RecipleMessageCommandExecuteData;
9
- }
10
- export interface CommandErrorData<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder> {
4
+ import { MessageCommandOptionManager } from '../classes/MessageCommandOptionManager';
5
+ import { RecipleCommandBuilder } from '../types/builders';
6
+ /**
7
+ * Halted command's data
8
+ */
9
+ export declare type RecipleHaltedCommandData<Builder extends RecipleCommandBuilder = RecipleCommandBuilder> = RecipleCommandErrorData<Builder> | RecipleCommandCooldownData<Builder> | (Builder extends InteractionCommandBuilder ? never : RecipleCommandInvalidArguments<Builder> | RecipleCommandMissingArguments<Builder>) | RecipleCommandMissingMemberPermissions<Builder> | RecipleCommandMissingBotPermissions<Builder>;
10
+ export interface RecipleCommandHaltBaseData<Builder extends RecipleCommandBuilder> {
11
+ executeData: Builder extends InteractionCommandBuilder ? InteractionCommandExecuteData : MessageCommandExecuteData;
12
+ }
13
+ export interface RecipleCommandErrorData<Builder extends RecipleCommandBuilder> extends RecipleCommandHaltBaseData<Builder> {
11
14
  reason: RecipleHaltedCommandReason.Error;
12
15
  error: any;
13
16
  }
14
- export interface CommandCooldownData<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder>, CooledDownUser {
17
+ export interface RecipleCommandCooldownData<Builder extends RecipleCommandBuilder> extends RecipleCommandHaltBaseData<Builder>, CooledDownUser {
15
18
  reason: RecipleHaltedCommandReason.Cooldown;
16
19
  }
17
- export interface CommandInvalidArguments<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder> {
20
+ export interface RecipleCommandInvalidArguments<Builder extends RecipleCommandBuilder> extends RecipleCommandHaltBaseData<Builder> {
18
21
  reason: RecipleHaltedCommandReason.InvalidArguments;
19
22
  invalidArguments: MessageCommandOptionManager;
20
23
  }
21
- export interface CommandMissingArguments<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder> {
24
+ export interface RecipleCommandMissingArguments<Builder extends RecipleCommandBuilder> extends RecipleCommandHaltBaseData<Builder> {
22
25
  reason: RecipleHaltedCommandReason.MissingArguments;
23
26
  missingArguments: MessageCommandOptionManager;
24
27
  }
25
- export interface CommandMissingMemberPermissions<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder> {
28
+ export interface RecipleCommandMissingMemberPermissions<Builder extends RecipleCommandBuilder> extends RecipleCommandHaltBaseData<Builder> {
26
29
  reason: RecipleHaltedCommandReason.MissingMemberPermissions;
27
30
  }
28
- export interface CommandMissingBotPermissions<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder> {
31
+ export interface RecipleCommandMissingBotPermissions<Builder extends RecipleCommandBuilder> extends RecipleCommandHaltBaseData<Builder> {
29
32
  reason: RecipleHaltedCommandReason.MissingBotPermissions;
30
33
  }
34
+ /**
35
+ * Command halt reasons
36
+ */
31
37
  export declare enum RecipleHaltedCommandReason {
32
38
  Error = 0,
33
39
  Cooldown = 1,
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RecipleHaltedCommandReason = void 0;
4
+ /**
5
+ * Command halt reasons
6
+ */
4
7
  var RecipleHaltedCommandReason;
5
8
  (function (RecipleHaltedCommandReason) {
6
9
  RecipleHaltedCommandReason[RecipleHaltedCommandReason["Error"] = 0] = "Error";
@@ -1,8 +1,10 @@
1
- import { InteractionBuilder } from '../registerInteractionCommands';
2
- import { RecipleModule, RecipleScript } from '../modules';
3
1
  import { RecipleClient } from '../classes/RecipleClient';
4
- import { ApplicationCommandData } from 'discord.js';
5
- export interface AddModuleOptions {
2
+ import { Config } from '../classes/RecipleConfig';
3
+ import { RecipleModule, RecipleScript } from '../modules';
4
+ import { ApplicationCommandBuilder } from '../registerInteractionCommands';
5
+ import { RecipleCommandBuilder } from './builders';
6
+ import { ApplicationCommandData, PermissionsBitField } from 'discord.js';
7
+ export interface RecipleAddModuleOptions {
6
8
  /**
7
9
  * The Module script
8
10
  */
@@ -16,7 +18,7 @@ export interface AddModuleOptions {
16
18
  */
17
19
  moduleInfo?: RecipleModule["info"];
18
20
  }
19
- export interface RegisterInteractionCommandsOptions {
21
+ export interface RecipleRegisterInteractionCommandsOptions {
20
22
  /**
21
23
  * Bot client
22
24
  */
@@ -24,9 +26,14 @@ export interface RegisterInteractionCommandsOptions {
24
26
  /**
25
27
  * Commands to register
26
28
  */
27
- commands: (ApplicationCommandData | InteractionBuilder)[];
28
- /**
29
+ commands: (ApplicationCommandData | ApplicationCommandBuilder)[];
30
+ /**PermissionResolvable
29
31
  * Set guild to not register commands globally
30
32
  */
31
33
  guilds?: string | string[];
32
34
  }
35
+ export interface RecipleUserHasCommandPermissionsOptions {
36
+ builder: RecipleCommandBuilder;
37
+ memberPermissions?: PermissionsBitField;
38
+ commandPermissions?: Config["commands"]["interactionCommand"]["permissions"] | Config["commands"]["messageCommand"]["permissions"];
39
+ }
@@ -1,20 +1,21 @@
1
+ import semver from 'semver';
1
2
  /**
2
3
  * Current reciple version
3
4
  */
4
5
  export declare const version: string;
5
6
  /**
6
7
  * Check if the version is valid
8
+ * @param ver Version string to validated
7
9
  */
8
10
  export declare function isValidVersion(ver: string): boolean;
9
11
  /**
10
12
  * Parse the version string
13
+ * @param ver Parse version string
11
14
  */
12
- export declare function parseVersion(ver: string): {
13
- major: number;
14
- minor: number;
15
- patch: number;
16
- };
15
+ export declare function parseVersion(ver: string): semver.SemVer | null;
17
16
  /**
18
17
  * Check if the given version is supported by the given version range
18
+ * @param versionRange Version range
19
+ * @param supportedVersion Version to match given version range
19
20
  */
20
21
  export declare function isSupportedVersion(versionRange: string, supportedVersion?: string): boolean;
@@ -11,6 +11,7 @@ const semver_1 = __importDefault(require("semver"));
11
11
  exports.version = `${semver_1.default.coerce(require('../../package.json').version)}`;
12
12
  /**
13
13
  * Check if the version is valid
14
+ * @param ver Version string to validated
14
15
  */
15
16
  function isValidVersion(ver) {
16
17
  return semver_1.default.valid(semver_1.default.coerce(ver)) !== null;
@@ -18,17 +19,18 @@ function isValidVersion(ver) {
18
19
  exports.isValidVersion = isValidVersion;
19
20
  /**
20
21
  * Parse the version string
22
+ * @param ver Parse version string
21
23
  */
22
24
  function parseVersion(ver) {
23
- var _a, _b;
24
25
  if (!isValidVersion(ver))
25
26
  throw new TypeError(`Invalid version: ${ver}`);
26
- const [major, minor, patch] = (_b = (_a = `${semver_1.default.coerce(ver)}`) === null || _a === void 0 ? void 0 : _a.split('.')) !== null && _b !== void 0 ? _b : [];
27
- return { major: parseInt(major), minor: parseInt(minor), patch: parseInt(patch) };
27
+ return semver_1.default.parse(ver);
28
28
  }
29
29
  exports.parseVersion = parseVersion;
30
30
  /**
31
31
  * Check if the given version is supported by the given version range
32
+ * @param versionRange Version range
33
+ * @param supportedVersion Version to match given version range
32
34
  */
33
35
  function isSupportedVersion(versionRange, supportedVersion) {
34
36
  supportedVersion = supportedVersion || exports.version;
package/package.json CHANGED
@@ -1,24 +1,41 @@
1
1
  {
2
2
  "name": "reciple",
3
- "version": "3.0.1",
4
- "description": "Handler for Discord.js",
3
+ "version": "3.1.0",
4
+ "bin": "bin/bin.js",
5
+ "license": "GPL-3.0",
6
+ "main": "bin/index.js",
5
7
  "author": "FalloutStudios",
8
+ "description": "Handler for Discord.js",
6
9
  "homepage": "https://reciple.js.org",
10
+ "keywords": [
11
+ "Discord",
12
+ "Discord.js handler",
13
+ "Reciple"
14
+ ],
7
15
  "contributors": [
8
16
  "GhexterCortes <cortesghexter@gmail.com>"
9
17
  ],
10
18
  "bugs": {
11
19
  "url": "https://github.com/FalloutStudios/reciple/issues"
12
20
  },
21
+ "scripts": {
22
+ "clean": "rm -rf bin",
23
+ "build": "yarn clean && yarn exec tsc",
24
+ "build:publish": "yarn build && yarn npm publish && yarn build:docs && yarn publish:docs",
25
+ "build:pub-prerelease": "yarn build && yarn publish --tag pre",
26
+ "build:docs": "yarn workspace docs build",
27
+ "update:docs": "yarn workspace docs update",
28
+ "test": "yarn build && yarn test:start",
29
+ "test:start": "cd test && yarn exec reciple -D",
30
+ "publish:docs": "yarn build:docs && yarn update:docs"
31
+ },
32
+ "workspaces": [
33
+ "./docs/"
34
+ ],
13
35
  "repository": {
14
36
  "type": "git",
15
37
  "url": "git+https://github.com/FalloutStudios/reciple.git"
16
38
  },
17
- "license": "GPL-3.0",
18
- "main": "bin/index.js",
19
- "bin": {
20
- "reciple": "bin/bin.js"
21
- },
22
39
  "engines": {
23
40
  "node": ">=16.9.0"
24
41
  },
@@ -29,18 +46,6 @@
29
46
  "LICENSE",
30
47
  "README.md"
31
48
  ],
32
- "scripts": {
33
- "clean": "rm -rf bin",
34
- "build": "yarn run clean && npx tsc && yarn run reinstall",
35
- "build:publish": "yarn run build && yarn publish && yarn run publish:docs",
36
- "build:pub-prerelease": "yarn run build && yarn publish --tag pre",
37
- "reinstall": "npm un reciple -g && npm i ./ -g",
38
- "publish:docs": "yarn run build:docs && yarn run update:docs",
39
- "test": "yarn run build && yarn run test:start",
40
- "test:start": "cd test && npx reciple",
41
- "build:docs": "cd docs && yarn run build",
42
- "update:docs": "cd docs && yarn run update"
43
- },
44
49
  "dependencies": {
45
50
  "chalk": "4.1.2",
46
51
  "commander": "^9.4.0",
@@ -59,5 +64,5 @@
59
64
  "peerDependencies": {
60
65
  "discord.js": "14.0.x"
61
66
  },
62
- "packageManager": "yarn@1.22.19"
63
- }
67
+ "packageManager": "yarn@3.2.2"
68
+ }
@@ -2,9 +2,9 @@
2
2
  # To use env variable as a token just do it like this env:TOKEN_ENV
3
3
  token: TOKEN
4
4
 
5
-
6
5
  # Commands options
7
6
  commands:
7
+ # message command options
8
8
  messageCommand:
9
9
  # enable message commands
10
10
  enabled: true
@@ -12,25 +12,27 @@ commands:
12
12
  prefix: '!'
13
13
  # reply when an error occured
14
14
  replyOnError: false
15
- # Enable the use of command cooldowns
15
+ # enable the use of command cooldowns
16
16
  enableCooldown: true
17
- # Allow executing commands via aliases
17
+ # allow executing commands via aliases
18
18
  allowCommandAlias: true
19
19
  # command argument separator
20
20
  commandArgumentSeparator: ' '
21
- # Overwrite command permissions
21
+ # overwrite command permissions
22
22
  permissions:
23
23
  # enable overwriten command permissions
24
24
  enabled: false
25
25
  commands:
26
26
  - command: 'example-command'
27
27
  permissions: ['Administrator']
28
+
29
+ # Interaction command options
28
30
  interactionCommand:
29
31
  # enable interaction commands
30
32
  enabled: true
31
33
  # reply when an error occured
32
34
  replyOnError: false
33
- # Enable the use of command cooldowns
35
+ # enable the use of command cooldowns
34
36
  enableCooldown: true
35
37
  # register interaction commands on bot ready
36
38
  registerCommands: true
@@ -38,7 +40,7 @@ commands:
38
40
  setRequiredPermissions: true
39
41
  # register commands to specific guild(s) empty to make it global
40
42
  guilds: []
41
- # Overwrite command permissions
43
+ # overwrite command permissions
42
44
  permissions:
43
45
  # enable overwriten command permissions
44
46
  enabled: false
@@ -71,6 +73,7 @@ fileLogging:
71
73
  logFilePath: './logs/latest.log'
72
74
 
73
75
  # Client options
76
+ # Learn more about client options at https://discord.js.org/#/docs/discord.js/main/typedef/ClientOptions
74
77
  client:
75
78
  intents:
76
79
  - 'Guilds'
@@ -78,7 +81,7 @@ client:
78
81
  - 'GuildMessages'
79
82
  - 'MessageContent'
80
83
 
81
- # Bot replies
84
+ # Bot messages
82
85
  messages:
83
86
  missingArguments: 'Not enough arguments.'
84
87
  invalidArguments: 'Invalid argument(s) given.'
@@ -99,16 +102,16 @@ messages:
99
102
  ignoredFiles: []
100
103
 
101
104
 
102
- ###################################################
103
- # #
104
- # ##### ##### # # ### ##### #### #
105
- # # # # # # # # # # # # #
106
- # # # ##### # # # # ### ### #### #
107
- # # # # # # # # # # # # #
108
- # ### # # # # ### ##### # # #
109
- # #
110
- ###################################################
111
- ## Modifying these values below can cause errors ##
105
+ ####################################################
106
+ # #
107
+ # ##### ##### # # ### ##### #### #
108
+ # # # # # # # # # # # # #
109
+ # # # ##### # # # # ### ### #### #
110
+ # # # # # # # # # # # # #
111
+ # ### # # # # ### ##### # # #
112
+ # #
113
+ ####################################################
114
+ ## Modifying the values below could break reciple ##
112
115
 
113
116
  # Modules folder
114
117
  modulesFolder: 'modules'