reciple 5.2.0 → 5.3.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.
@@ -60,11 +60,11 @@ class MessageCommandBuilder {
60
60
  aliases = (0, discord_js_1.normalizeArray)(aliases);
61
61
  if (!aliases.length)
62
62
  throw new TypeError('Provide atleast one alias');
63
- if (aliases.some(a => !a || typeof a !== 'string' || !a.match(/^[\w-]{1,32}$/)))
64
- throw new TypeError('aliases must be strings and match the regex /^[\\w-]{1,32}$/');
63
+ if (aliases.some(a => !a || typeof a !== 'string' || a.match(/^\s+$/)))
64
+ throw new TypeError('aliases must be strings and should not contain whitespaces');
65
65
  if (this.name && aliases.some(a => a == this.name))
66
66
  throw new TypeError('alias cannot have same name to its real command name');
67
- this.aliases = [...new Set(aliases)];
67
+ this.aliases = [...new Set(aliases.map(s => s.toLowerCase()))];
68
68
  return this;
69
69
  }
70
70
  /**
@@ -43,7 +43,6 @@ export declare class SlashCommandBuilder extends DiscordJsSlashCommandBuilder im
43
43
  cooldown: number;
44
44
  requiredBotPermissions: PermissionResolvable[];
45
45
  requiredMemberPermissions: PermissionResolvable[];
46
- allowExecuteInDM: boolean;
47
46
  halt?: SlashCommandHaltFunction;
48
47
  execute: SlashCommandExecuteFunction;
49
48
  setCooldown(cooldown: number): this;
@@ -13,7 +13,6 @@ class SlashCommandBuilder extends discord_js_1.SlashCommandBuilder {
13
13
  this.cooldown = 0;
14
14
  this.requiredBotPermissions = [];
15
15
  this.requiredMemberPermissions = [];
16
- this.allowExecuteInDM = true;
17
16
  this.execute = () => { };
18
17
  }
19
18
  setCooldown(cooldown) {
@@ -20,10 +20,10 @@ function createLogger(stringifyJSON, debugmode = false, colorizeMessage = true)
20
20
  enableDebugMode: (_a = flags_1.flags.debugmode) !== null && _a !== void 0 ? _a : debugmode,
21
21
  loggerName: 'Main',
22
22
  prefixes: {
23
- [fallout_utility_1.LogLevels.INFO]: (name) => `[${new Date().toLocaleTimeString('en-US', { hour12: false })}][${(name ? name + "/" : '') + "INFO"}]`,
24
- [fallout_utility_1.LogLevels.WARN]: (name) => `[${chalk_1.default.yellow(new Date().toLocaleTimeString('en-US', { hour12: false }))}][${chalk_1.default.yellow((name ? name + "/" : '') + "WARN")}]`,
25
- [fallout_utility_1.LogLevels.ERROR]: (name) => `[${chalk_1.default.red(new Date().toLocaleTimeString('en-US', { hour12: false }))}][${chalk_1.default.red((name ? name + "/" : '') + "ERROR")}]`,
26
- [fallout_utility_1.LogLevels.DEBUG]: (name) => `[${chalk_1.default.blue(new Date().toLocaleTimeString('en-US', { hour12: false }))}][${chalk_1.default.blue((name ? name + "/" : '') + "DEBUG")}]`
23
+ [fallout_utility_1.LogLevels.INFO]: (name) => `[${new Date().toLocaleTimeString(undefined, { hour12: false })}][${(name ? name + "/" : '') + "INFO"}]`,
24
+ [fallout_utility_1.LogLevels.WARN]: (name) => `[${chalk_1.default.yellow(new Date().toLocaleTimeString(undefined, { hour12: false }))}][${chalk_1.default.yellow((name ? name + "/" : '') + "WARN")}]`,
25
+ [fallout_utility_1.LogLevels.ERROR]: (name) => `[${chalk_1.default.red(new Date().toLocaleTimeString(undefined, { hour12: false }))}][${chalk_1.default.red((name ? name + "/" : '') + "ERROR")}]`,
26
+ [fallout_utility_1.LogLevels.DEBUG]: (name) => `[${chalk_1.default.blue(new Date().toLocaleTimeString(undefined, { hour12: false }))}][${chalk_1.default.blue((name ? name + "/" : '') + "DEBUG")}]`
27
27
  },
28
28
  colorMessages: {
29
29
  [fallout_utility_1.LogLevels.INFO]: (message) => message,
@@ -40,7 +40,6 @@ export interface SharedCommandBuilderProperties {
40
40
  cooldown: number;
41
41
  requiredBotPermissions: PermissionResolvable[];
42
42
  requiredMemberPermissions: PermissionResolvable[];
43
- allowExecuteInDM: boolean;
44
43
  halt?: AnyCommandHaltFunction;
45
44
  execute: AnyCommandExecuteFunction;
46
45
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reciple",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "bin": "bin/bin.js",
5
5
  "license": "GPL-3.0",
6
6
  "main": "bin/index.js",