This commit is contained in:
Dragon Fire
2021-01-30 12:06:35 -05:00
parent 410ed3bc4f
commit 42131c1bc6
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ module.exports = class ImageOrAvatarArgumentType extends ArgumentType {
super(client, 'image-or-avatar');
}
async validate(value, msg, arg) {
validate(value, msg, arg) {
return this.client.registry.types.get('image').validate(value, msg, arg)
|| this.client.registry.types.get('user').validate(value, msg, arg);
}
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class ImageArgumentType extends ArgumentType {
return false;
}
async parse(value, msg) {
parse(value, msg) {
const attachment = msg.attachments.first();
if (attachment) return attachment.url;
if (fileTypeRe.test(value.toLowerCase())) return value;