reciple 5.4.1-pre.1 → 5.4.1-pre.4

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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
package/bin/mjs/bin.js CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import { RecipleClient } from './reciple/classes/RecipleClient';
3
- import { RecipleConfig } from './reciple/classes/RecipleConfig';
4
- import { rawVersion } from './reciple/version';
5
- import { existsSync, readdirSync } from 'fs';
6
- import { cwd, flags } from './reciple/flags';
7
- import { input } from 'fallout-utility';
8
- import chalk from 'chalk';
2
+ import { RecipleClient } from './reciple/classes/RecipleClient.js';
3
+ import { RecipleConfig } from './reciple/classes/RecipleConfig.js';
4
+ import { rawVersion } from './reciple/version.js';
5
+ import { existsSync, readdirSync } from 'fs.js';
6
+ import { cwd, flags } from './reciple/flags.js';
7
+ import { input } from 'fallout-utility.js';
8
+ import chalk from 'chalk.js';
9
9
  import 'dotenv/config';
10
- import { normalizeArray } from 'discord.js';
11
- import path from 'path';
10
+ import { normalizeArray } from 'discord.js.js';
11
+ import path from 'path.js';
12
12
  const allowedFiles = ['node_modules', 'reciple.yml', 'package.json'];
13
13
  const configPath = path.join(cwd, './reciple.yml');
14
14
  if (readdirSync(cwd).filter(f => !f.startsWith('.') && allowedFiles.indexOf(f)).length > 0 && !existsSync(flags.config ?? configPath)) {
package/bin/mjs/index.js CHANGED
@@ -1,17 +1,17 @@
1
- export * from './reciple/classes/CommandCooldownManager';
2
- export * from './reciple/classes/MessageCommandOptionManager';
3
- export * from './reciple/classes/RecipleClient';
4
- export * from './reciple/classes/RecipleConfig';
5
- export * from './reciple/classes/builders/MessageCommandBuilder';
6
- export * from './reciple/classes/builders/MessageCommandOptionBuilder';
7
- export * from './reciple/classes/builders/SlashCommandBuilder';
8
- export * from './reciple/types/builders';
9
- export * from './reciple/types/commands';
10
- export * from './reciple/types/paramOptions';
11
- export * from './reciple/flags';
12
- export * from './reciple/logger';
13
- export * from './reciple/modules';
14
- export * from './reciple/permissions';
15
- export * from './reciple/registerApplicationCommands';
16
- export * from './reciple/util';
17
- export * from './reciple/version';
1
+ export * from './reciple/classes/CommandCooldownManager.js';
2
+ export * from './reciple/classes/MessageCommandOptionManager.js';
3
+ export * from './reciple/classes/RecipleClient.js';
4
+ export * from './reciple/classes/RecipleConfig.js';
5
+ export * from './reciple/classes/builders/MessageCommandBuilder.js';
6
+ export * from './reciple/classes/builders/MessageCommandOptionBuilder.js';
7
+ export * from './reciple/classes/builders/SlashCommandBuilder.js';
8
+ export * from './reciple/types/builders.js';
9
+ export * from './reciple/types/commands.js';
10
+ export * from './reciple/types/paramOptions.js';
11
+ export * from './reciple/flags.js';
12
+ export * from './reciple/logger.js';
13
+ export * from './reciple/modules.js';
14
+ export * from './reciple/permissions.js';
15
+ export * from './reciple/registerApplicationCommands.js';
16
+ export * from './reciple/util.js';
17
+ export * from './reciple/version.js';
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -1,4 +1,4 @@
1
- import { normalizeArray } from 'discord.js';
1
+ import { normalizeArray } from 'discord.js.js';
2
2
  /**
3
3
  * cooled-down users manager
4
4
  */
@@ -1,4 +1,4 @@
1
- import { normalizeArray } from 'discord.js';
1
+ import { normalizeArray } from 'discord.js.js';
2
2
  /**
3
3
  * Validated message options manager
4
4
  */
@@ -1,19 +1,19 @@
1
- import { MessageCommandBuilder, validateMessageCommandOptions } from './builders/MessageCommandBuilder';
2
- import { SlashCommandBuilder } from './builders/SlashCommandBuilder';
3
- import { CommandBuilderType } from '../types/builders';
4
- import { registerApplicationCommands } from '../registerApplicationCommands';
5
- import { CommandHaltReason } from '../types/commands';
6
- import { botHasExecutePermissions, userHasCommandPermissions } from '../permissions';
7
- import { CommandCooldownManager } from './CommandCooldownManager';
8
- import { MessageCommandOptionManager } from './MessageCommandOptionManager';
9
- import { getCommand } from 'fallout-utility';
10
- import { RecipleConfig } from './RecipleConfig';
11
- import { getModules } from '../modules';
12
- import { createLogger } from '../logger';
13
- import { version } from '../version';
14
- import { cwd } from '../flags';
15
- import path from 'path';
16
- import { ChannelType, Client, normalizeArray } from 'discord.js';
1
+ import { MessageCommandBuilder, validateMessageCommandOptions } from './builders/MessageCommandBuilder.js';
2
+ import { SlashCommandBuilder } from './builders/SlashCommandBuilder.js';
3
+ import { CommandBuilderType } from '../types/builders.js';
4
+ import { registerApplicationCommands } from '../registerApplicationCommands.js';
5
+ import { CommandHaltReason } from '../types/commands.js';
6
+ import { botHasExecutePermissions, userHasCommandPermissions } from '../permissions.js';
7
+ import { CommandCooldownManager } from './CommandCooldownManager.js';
8
+ import { MessageCommandOptionManager } from './MessageCommandOptionManager.js';
9
+ import { getCommand } from 'fallout-utility.js';
10
+ import { RecipleConfig } from './RecipleConfig.js';
11
+ import { getModules } from '../modules.js';
12
+ import { createLogger } from '../logger.js';
13
+ import { version } from '../version.js';
14
+ import { cwd } from '../flags.js';
15
+ import path from 'path.js';
16
+ import { ChannelType, Client, normalizeArray } from 'discord.js.js';
17
17
  export class RecipleClient extends Client {
18
18
  config = RecipleConfig.getDefaultConfig();
19
19
  commands = { slashCommands: {}, messageCommands: {} };
@@ -1,9 +1,9 @@
1
- import { existsSync, readFileSync, writeFileSync } from 'fs';
2
- import { isSupportedVersion, version } from '../version';
3
- import { input, replaceAll } from 'fallout-utility';
4
- import { cwd, token as __token } from '../flags';
5
- import path from 'path';
6
- import yaml from 'yaml';
1
+ import { existsSync, readFileSync, writeFileSync } from 'fs.js';
2
+ import { isSupportedVersion, version } from '../version.js';
3
+ import { input, replaceAll } from 'fallout-utility.js';
4
+ import { cwd, token as __token } from '../flags.js';
5
+ import path from 'path.js';
6
+ import yaml from 'yaml.js';
7
7
  /**
8
8
  * Create/parse reciple config
9
9
  */
@@ -1,7 +1,7 @@
1
- import { CommandBuilderType } from '../../types/builders';
2
- import { normalizeArray } from 'discord.js';
3
- import { MessageCommandOptionManager } from '../MessageCommandOptionManager';
4
- import { MessageCommandOptionBuilder } from './MessageCommandOptionBuilder';
1
+ import { CommandBuilderType } from '../../types/builders.js';
2
+ import { normalizeArray } from 'discord.js.js';
3
+ import { MessageCommandOptionManager } from '../MessageCommandOptionManager.js';
4
+ import { MessageCommandOptionBuilder } from './MessageCommandOptionBuilder.js';
5
5
  /**
6
6
  * Reciple builder for message command
7
7
  */
@@ -1,6 +1,6 @@
1
- import { CommandBuilderType } from '../../types/builders';
2
- import { isClass } from '../../util';
3
- import { normalizeArray, SlashCommandBuilder as DiscordJsSlashCommandBuilder, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, SlashCommandBooleanOption, SlashCommandUserOption, SlashCommandChannelOption, SlashCommandRoleOption, SlashCommandAttachmentOption, SlashCommandMentionableOption, SlashCommandStringOption, SlashCommandIntegerOption, SlashCommandNumberOption, ApplicationCommandOptionType } from 'discord.js';
1
+ import { CommandBuilderType } from '../../types/builders.js';
2
+ import { isClass } from '../../util.js';
3
+ import { normalizeArray, SlashCommandBuilder as DiscordJsSlashCommandBuilder, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, SlashCommandBooleanOption, SlashCommandUserOption, SlashCommandChannelOption, SlashCommandRoleOption, SlashCommandAttachmentOption, SlashCommandMentionableOption, SlashCommandStringOption, SlashCommandIntegerOption, SlashCommandNumberOption, ApplicationCommandOptionType } from 'discord.js.js';
4
4
  /**
5
5
  * Reciple builder for slash command
6
6
  */
@@ -1,5 +1,5 @@
1
- import { rawVersion } from './version';
2
- import { Command } from 'commander';
1
+ import { rawVersion } from './version.js';
2
+ import { Command } from 'commander.js';
3
3
  /**
4
4
  * Commander
5
5
  */
@@ -1,6 +1,6 @@
1
- import { Logger, LogLevels } from 'fallout-utility';
2
- import { flags } from './flags';
3
- import chalk from 'chalk';
1
+ import { Logger, LogLevels } from 'fallout-utility.js';
2
+ import { flags } from './flags.js';
3
+ import chalk from 'chalk.js';
4
4
  /**
5
5
  * Create new logger
6
6
  * @param stringifyJSON stringify json objects in console
@@ -1,12 +1,12 @@
1
- import { CommandBuilderType } from './types/builders';
2
- import { MessageCommandBuilder } from './classes/builders/MessageCommandBuilder';
3
- import { SlashCommandBuilder } from './classes/builders/SlashCommandBuilder';
4
- import { normalizeArray } from 'discord.js';
5
- import { isSupportedVersion, version } from './version';
6
- import { existsSync, mkdirSync, readdirSync } from 'fs';
7
- import wildcard from 'wildcard-match';
8
- import { cwd } from './flags';
9
- import path from 'path';
1
+ import { CommandBuilderType } from './types/builders.js';
2
+ import { MessageCommandBuilder } from './classes/builders/MessageCommandBuilder.js';
3
+ import { SlashCommandBuilder } from './classes/builders/SlashCommandBuilder.js';
4
+ import { normalizeArray } from 'discord.js.js';
5
+ import { isSupportedVersion, version } from './version.js';
6
+ import { existsSync, mkdirSync, readdirSync } from 'fs.js';
7
+ import wildcard from 'wildcard-match.js';
8
+ import { cwd } from './flags.js';
9
+ import path from 'path.js';
10
10
  /**
11
11
  * Load modules from folder
12
12
  * @param client Reciple client
@@ -1,5 +1,5 @@
1
- import { normalizeArray } from 'discord.js';
2
- import { SlashCommandBuilder } from './classes/builders/SlashCommandBuilder';
1
+ import { normalizeArray } from 'discord.js.js';
2
+ import { SlashCommandBuilder } from './classes/builders/SlashCommandBuilder.js';
3
3
  /**
4
4
  * Register application commands
5
5
  * @param options Register application commands options
@@ -1,4 +1,4 @@
1
- import semver from 'semver';
1
+ import semver from 'semver.js';
2
2
  /**
3
3
  * Current reciple version
4
4
  */
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "reciple",
3
- "version": "5.4.1-pre.1",
3
+ "version": "5.4.1-pre.4",
4
4
  "license": "GPL-3.0",
5
5
  "typings": "bin/types/index.d.ts",
6
6
  "author": "FalloutStudios",
7
7
  "description": "Handler for Discord.js",
8
8
  "homepage": "https://reciple.js.org",
9
- "bin": {
10
- "reciple": "./bin/cjs/bin.js"
11
- },
9
+ "main": "./bin/cjs/index.js",
10
+ "module": "./bin/mjs/index.js",
11
+ "bin": "./bin/cjs/bin.js",
12
12
  "exports": {
13
- "import": "./bin/mjs/bin.js",
13
+ "import": "./bin/mjs/index.js",
14
14
  "require": "./bin/cjs/index.js"
15
15
  },
16
16
  "keywords": [
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "scripts": {
28
28
  "clean": "yarn exec rimraf bin",
29
- "build": "yarn clean && echo Building commonjs && yarn exec tsc -p ./tsconfigs/tsconfig-cjs.json && echo Building mjs && yarn exec tsc -p ./tsconfigs/tsconfig-mjs.json",
29
+ "build": "yarn clean && echo Building commonjs && yarn exec tsc -p ./tsconfigs/tsconfig-cjs.json && echo Building mjs && yarn exec tsc -p ./tsconfigs/tsconfig-mjs.json && node ./tsconfigs/package.json.js",
30
30
  "build:publish": "yarn build && yarn npm publish && yarn build:docs && yarn publish:docs",
31
31
  "build:publish-prerelease": "yarn build && yarn npm publish --tag pre",
32
32
  "build:docs": "yarn exec typedoc --tsconfig ./docs/typedoc.json",