reciple 5.4.1-pre.4 → 5.4.1-pre.5
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.
- package/bin/mjs/bin.js +5 -5
- package/bin/mjs/reciple/classes/CommandCooldownManager.js +1 -1
- package/bin/mjs/reciple/classes/MessageCommandOptionManager.js +1 -1
- package/bin/mjs/reciple/classes/RecipleClient.js +3 -3
- package/bin/mjs/reciple/classes/RecipleConfig.js +4 -4
- package/bin/mjs/reciple/classes/builders/MessageCommandBuilder.js +1 -1
- package/bin/mjs/reciple/classes/builders/SlashCommandBuilder.js +1 -1
- package/bin/mjs/reciple/flags.js +1 -1
- package/bin/mjs/reciple/logger.js +2 -2
- package/bin/mjs/reciple/modules.js +4 -4
- package/bin/mjs/reciple/registerApplicationCommands.js +1 -1
- package/bin/mjs/reciple/version.js +1 -1
- package/package.json +1 -1
package/bin/mjs/bin.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { RecipleClient } from './reciple/classes/RecipleClient.js';
|
|
3
3
|
import { RecipleConfig } from './reciple/classes/RecipleConfig.js';
|
|
4
4
|
import { rawVersion } from './reciple/version.js';
|
|
5
|
-
import { existsSync, readdirSync } from 'fs
|
|
5
|
+
import { existsSync, readdirSync } from 'fs';
|
|
6
6
|
import { cwd, flags } from './reciple/flags.js';
|
|
7
|
-
import { input } from 'fallout-utility
|
|
8
|
-
import chalk from 'chalk
|
|
7
|
+
import { input } from 'fallout-utility';
|
|
8
|
+
import chalk from 'chalk';
|
|
9
9
|
import 'dotenv/config';
|
|
10
|
-
import { normalizeArray } from 'discord.js
|
|
11
|
-
import path from 'path
|
|
10
|
+
import { normalizeArray } from 'discord.js';
|
|
11
|
+
import path from 'path';
|
|
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)) {
|
|
@@ -6,14 +6,14 @@ import { CommandHaltReason } from '../types/commands.js';
|
|
|
6
6
|
import { botHasExecutePermissions, userHasCommandPermissions } from '../permissions.js';
|
|
7
7
|
import { CommandCooldownManager } from './CommandCooldownManager.js';
|
|
8
8
|
import { MessageCommandOptionManager } from './MessageCommandOptionManager.js';
|
|
9
|
-
import { getCommand } from 'fallout-utility
|
|
9
|
+
import { getCommand } from 'fallout-utility';
|
|
10
10
|
import { RecipleConfig } from './RecipleConfig.js';
|
|
11
11
|
import { getModules } from '../modules.js';
|
|
12
12
|
import { createLogger } from '../logger.js';
|
|
13
13
|
import { version } from '../version.js';
|
|
14
14
|
import { cwd } from '../flags.js';
|
|
15
|
-
import path from 'path
|
|
16
|
-
import { ChannelType, Client, normalizeArray } from 'discord.js
|
|
15
|
+
import path from 'path';
|
|
16
|
+
import { ChannelType, Client, normalizeArray } from 'discord.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
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync } from 'fs';
|
|
2
2
|
import { isSupportedVersion, version } from '../version.js';
|
|
3
|
-
import { input, replaceAll } from 'fallout-utility
|
|
3
|
+
import { input, replaceAll } from 'fallout-utility';
|
|
4
4
|
import { cwd, token as __token } from '../flags.js';
|
|
5
|
-
import path from 'path
|
|
6
|
-
import yaml from 'yaml
|
|
5
|
+
import path from 'path';
|
|
6
|
+
import yaml from 'yaml';
|
|
7
7
|
/**
|
|
8
8
|
* Create/parse reciple config
|
|
9
9
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommandBuilderType } from '../../types/builders.js';
|
|
2
|
-
import { normalizeArray } from 'discord.js
|
|
2
|
+
import { normalizeArray } from 'discord.js';
|
|
3
3
|
import { MessageCommandOptionManager } from '../MessageCommandOptionManager.js';
|
|
4
4
|
import { MessageCommandOptionBuilder } from './MessageCommandOptionBuilder.js';
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CommandBuilderType } from '../../types/builders.js';
|
|
2
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
|
|
3
|
+
import { normalizeArray, SlashCommandBuilder as DiscordJsSlashCommandBuilder, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, SlashCommandBooleanOption, SlashCommandUserOption, SlashCommandChannelOption, SlashCommandRoleOption, SlashCommandAttachmentOption, SlashCommandMentionableOption, SlashCommandStringOption, SlashCommandIntegerOption, SlashCommandNumberOption, ApplicationCommandOptionType } from 'discord.js';
|
|
4
4
|
/**
|
|
5
5
|
* Reciple builder for slash command
|
|
6
6
|
*/
|
package/bin/mjs/reciple/flags.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Logger, LogLevels } from 'fallout-utility
|
|
1
|
+
import { Logger, LogLevels } from 'fallout-utility';
|
|
2
2
|
import { flags } from './flags.js';
|
|
3
|
-
import chalk from 'chalk
|
|
3
|
+
import chalk from 'chalk';
|
|
4
4
|
/**
|
|
5
5
|
* Create new logger
|
|
6
6
|
* @param stringifyJSON stringify json objects in console
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CommandBuilderType } from './types/builders.js';
|
|
2
2
|
import { MessageCommandBuilder } from './classes/builders/MessageCommandBuilder.js';
|
|
3
3
|
import { SlashCommandBuilder } from './classes/builders/SlashCommandBuilder.js';
|
|
4
|
-
import { normalizeArray } from 'discord.js
|
|
4
|
+
import { normalizeArray } from 'discord.js';
|
|
5
5
|
import { isSupportedVersion, version } from './version.js';
|
|
6
|
-
import { existsSync, mkdirSync, readdirSync } from 'fs
|
|
7
|
-
import wildcard from 'wildcard-match
|
|
6
|
+
import { existsSync, mkdirSync, readdirSync } from 'fs';
|
|
7
|
+
import wildcard from 'wildcard-match';
|
|
8
8
|
import { cwd } from './flags.js';
|
|
9
|
-
import path from 'path
|
|
9
|
+
import path from 'path';
|
|
10
10
|
/**
|
|
11
11
|
* Load modules from folder
|
|
12
12
|
* @param client Reciple client
|