From 3a6c5224ed7fa5487bc16309b42e5a69d6fe7de2 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 24 Mar 2024 00:45:20 -0400 Subject: [PATCH] Fix? --- framework/Dispatcher.js | 2 -- framework/UnionType.js | 2 -- framework/types/default-emoji.js | 3 +-- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/framework/Dispatcher.js b/framework/Dispatcher.js index c4f1a8bd..06069370 100644 --- a/framework/Dispatcher.js +++ b/framework/Dispatcher.js @@ -80,7 +80,6 @@ module.exports = class CommandDispatcher { continue; } } - console.log(parsedArg); const valid = await arg.validate(parsedArg, msg, arg); if (!valid || typeof valid === 'string') { return stripIndents` @@ -88,7 +87,6 @@ module.exports = class CommandDispatcher { ${arg.invalidText} `; } - console.log(parsedArg); finalResult[arg.key] = await arg.parse(parsedArg, msg, arg); } return { command, args: finalResult }; diff --git a/framework/UnionType.js b/framework/UnionType.js index 1441f97f..523b6dda 100644 --- a/framework/UnionType.js +++ b/framework/UnionType.js @@ -16,7 +16,6 @@ module.exports = class ArgumentUnionType extends ArgumentType { async validate(val, msg, arg) { let results = this.types.map(type => !type.isEmpty(val, msg, arg) && type.validate(val, msg, arg)); results = await Promise.all(results); - console.log(results); if (results.some(valid => valid && typeof valid !== 'string')) return true; const errors = results.filter(valid => typeof valid === 'string'); if (errors.length > 0) return errors.join('\n'); @@ -26,7 +25,6 @@ module.exports = class ArgumentUnionType extends ArgumentType { async parse(val, msg, arg) { let results = this.types.map(type => !type.isEmpty(val, msg, arg) && type.validate(val, msg, arg)); results = await Promise.all(results); - console.log(results); for (let i = 0; i < results.length; i++) { if (results[i] && typeof results[i] !== 'string') return this.types[i].parse(val, msg, arg); } diff --git a/framework/types/default-emoji.js b/framework/types/default-emoji.js index e9e309a1..cc1a7f29 100644 --- a/framework/types/default-emoji.js +++ b/framework/types/default-emoji.js @@ -7,8 +7,7 @@ module.exports = class DefaultEmojiArgumentType extends ArgumentType { } validate(value) { - if (!emojiRegex.test(value)) return false; - return true; + return emojiRegex.test(value); } parse(value) {