Fix message type

This commit is contained in:
Dragon Fire
2024-04-29 02:12:16 -04:00
parent 18b50f911d
commit a4d1855e4e
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ module.exports = class MessageArgumentType extends ArgumentType {
async validate(val, msg) {
if (!/^[0-9]+$/.test(val)) return false;
return Boolean(await msg.channel.messages.fetch({ message: val }).catch(() => null));
return Boolean(await msg.channel.messages.fetch(val).catch(() => null));
}
parse(val, msg) {
+2 -1
View File
@@ -12,7 +12,8 @@ module.exports = class UserArgumentType extends ArgumentType {
const user = await msg.client.users.fetch(matches[1]);
if (!user) return false;
return true;
} catch {
} catch (err) {
console.error(err);
return false;
}
}