reciple 1.0.5 → 1.0.8
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClientOptions, MessageOptions, PermissionResolvable } from 'discord.js';
|
|
1
|
+
import { ClientOptions, InteractionReplyOptions, MessageOptions, PermissionResolvable } from 'discord.js';
|
|
2
2
|
export interface Config {
|
|
3
3
|
token: string;
|
|
4
4
|
prefix: string;
|
|
@@ -42,7 +42,7 @@ export interface Config {
|
|
|
42
42
|
};
|
|
43
43
|
client: ClientOptions;
|
|
44
44
|
messages: {
|
|
45
|
-
[key: string]: MessageOptions | string;
|
|
45
|
+
[key: string]: MessageOptions | InteractionReplyOptions | string;
|
|
46
46
|
};
|
|
47
47
|
modulesFolder: string;
|
|
48
48
|
version?: string;
|
|
@@ -5,9 +5,9 @@ function isIgnoredChannel(channelId, ignoredChannelsConfig) {
|
|
|
5
5
|
if (!(ignoredChannelsConfig === null || ignoredChannelsConfig === void 0 ? void 0 : ignoredChannelsConfig.enabled))
|
|
6
6
|
return false;
|
|
7
7
|
if (ignoredChannelsConfig.channels.includes(channelId) && !ignoredChannelsConfig.convertToAllowList)
|
|
8
|
-
return
|
|
8
|
+
return true;
|
|
9
9
|
if (!ignoredChannelsConfig.channels.includes(channelId) && ignoredChannelsConfig.convertToAllowList)
|
|
10
|
-
return
|
|
11
|
-
return
|
|
10
|
+
return true;
|
|
11
|
+
return false;
|
|
12
12
|
}
|
|
13
13
|
exports.isIgnoredChannel = isIgnoredChannel;
|
package/bin/reciple/modules.js
CHANGED
|
@@ -14,7 +14,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.loadModules = void 0;
|
|
16
16
|
const fs_1 = require("fs");
|
|
17
|
-
const MessageCommandBuilder_1 = require("./classes/builders/MessageCommandBuilder");
|
|
18
17
|
const path_1 = __importDefault(require("path"));
|
|
19
18
|
function loadModules(client) {
|
|
20
19
|
var _a;
|
|
@@ -52,7 +51,7 @@ function loadModules(client) {
|
|
|
52
51
|
logger.error(`A message command name is not defined in ${script}`);
|
|
53
52
|
return false;
|
|
54
53
|
}
|
|
55
|
-
if (c
|
|
54
|
+
if (c.type === 'MESSAGE_COMMAND' && c.options.length && c.options.some(o => !o.name)) {
|
|
56
55
|
logger.error(`A message command option name is not defined in ${script}`);
|
|
57
56
|
return false;
|
|
58
57
|
}
|
package/package.json
CHANGED
package/resource/reciple.yml
CHANGED
|
@@ -44,8 +44,13 @@ client:
|
|
|
44
44
|
- 'GUILD_MESSAGE_REACTIONS'
|
|
45
45
|
|
|
46
46
|
messages:
|
|
47
|
-
noPermission: 'You do not have permission to use this command.'
|
|
48
47
|
notEnoughArguments: 'Not enough arguments.'
|
|
48
|
+
noPermission:
|
|
49
|
+
content: 'You do not have permission to use this command.'
|
|
50
|
+
ephemeral: true
|
|
51
|
+
error:
|
|
52
|
+
content: 'An error occurred.'
|
|
53
|
+
ephemeral: true
|
|
49
54
|
|
|
50
55
|
modulesFolder: 'modules'
|
|
51
56
|
|