@somehiddenkey/discord-command-utils 1.0.2 → 1.0.3
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/package.json +1 -1
- package/src/Configs/ConfigError.js +2 -4
- package/src/Configs/GlobalConfig.js +2 -2
- package/src/Configs/LocalConfig.js +2 -5
- package/src/Configs/SecretConfig.js +1 -1
- package/src/Interactions/CommandError.js +2 -1
- package/src/Interactions/Interaction.js +7 -6
- package/src/Interactions/InteractionContainer.js +11 -10
- package/src/Interactions/RestCommands.js +2 -3
- package/src/Utils/checks.js +1 -1
package/package.json
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import fs from 'fs';
|
|
6
|
-
import ConfigError from "./ConfigError";
|
|
6
|
+
import ConfigError from "./ConfigError.js";
|
|
7
7
|
import consola from 'consola';
|
|
8
|
-
import { InteractionScope } from "../Utils/enums";
|
|
8
|
+
import { InteractionScope } from "../Utils/enums.js";
|
|
9
9
|
|
|
10
10
|
export default class GlobalConfig {
|
|
11
11
|
/** @type {Guilds} */
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
* @typedef {string} Snowflake
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { RESTOptions } from '@discordjs/rest';
|
|
6
|
-
import { ActivitiesOptions } from 'discord.js';
|
|
7
|
-
|
|
8
5
|
export default class LocalConfig {
|
|
9
6
|
/** @type {string?} */
|
|
10
7
|
prefix;
|
|
@@ -13,9 +10,9 @@ export default class LocalConfig {
|
|
|
13
10
|
|
|
14
11
|
/** @type {object} */
|
|
15
12
|
local;
|
|
16
|
-
/** @type {
|
|
13
|
+
/** @type {object} */
|
|
17
14
|
restOptions;
|
|
18
|
-
/** @type {
|
|
15
|
+
/** @type {object} */
|
|
19
16
|
activity;
|
|
20
17
|
|
|
21
18
|
constructor(data) {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import InteractionContainer from "./InteractionContainer.js";
|
|
2
|
+
import { InteractionType, InteractionScope } from "../Utils/enums.js";
|
|
3
|
+
import pkg from 'discord.js';
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
Interaction: DiscordBaseInteraction,
|
|
3
7
|
OmitPartialGroupDMChannel,
|
|
4
8
|
Message,
|
|
5
9
|
ModalSubmitInteraction,
|
|
6
10
|
ButtonInteraction,
|
|
7
11
|
AnySelectMenuInteraction,
|
|
8
12
|
ChatInputCommandInteraction,
|
|
9
|
-
CacheType
|
|
10
|
-
} from 'discord.js';
|
|
11
|
-
import InteractionContainer from "./InteractionContainer";
|
|
12
|
-
import { InteractionType, InteractionScope } from "../Utils/enums";
|
|
13
|
+
CacheType } = pkg;
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* @typedef { (interaction: DiscordBaseInteraction<CacheType>) => Promise<any> } InteractionFunction
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import Interaction from "./Interaction.js";
|
|
2
|
+
import { InteractionScope, InteractionType } from "../Utils/enums.js";
|
|
3
|
+
import GlobalConfig from "../Configs/GlobalConfig.js";
|
|
4
|
+
import LocalConfig from "../Configs/LocalConfig.js";
|
|
5
|
+
import consola from "consola";
|
|
6
|
+
import CommandError from "./CommandError.js";
|
|
7
|
+
import RestCommands from './RestCommands.js';
|
|
8
|
+
import pkg from 'discord.js';
|
|
9
|
+
const {
|
|
10
|
+
Interaction: DiscordBaseInteraction,
|
|
3
11
|
OmitPartialGroupDMChannel,
|
|
4
12
|
Message,
|
|
5
13
|
CacheType
|
|
6
|
-
}
|
|
7
|
-
import Interaction from "./Interaction";
|
|
8
|
-
import { InteractionScope, InteractionType } from "../Utils/enums";
|
|
9
|
-
import GlobalConfig from "../Configs/GlobalConfig";
|
|
10
|
-
import LocalConfig from "../Configs/LocalConfig";
|
|
11
|
-
import consola from "consola";
|
|
12
|
-
import CommandError from "./CommandError";
|
|
13
|
-
import RestCommands from './RestCommands';
|
|
14
|
+
} = pkg;
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* @typedef { (interaction: DiscordBaseInteraction<CacheType>) => Promise<any> } InteractionFunction
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import LocalConfig from "../Configs/LocalConfig";
|
|
1
|
+
import GlobalConfig from "../Configs/GlobalConfig.js";
|
|
2
|
+
import LocalConfig from "../Configs/LocalConfig.js";
|
|
4
3
|
import { REST } from "discord.js";
|
|
5
4
|
|
|
6
5
|
export default class RestCommands {
|
package/src/Utils/checks.js
CHANGED