mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Fix lint
This commit is contained in:
@@ -5,7 +5,7 @@ module.exports = class ImageOrAvatarArgumentType extends ArgumentType {
|
|||||||
super(client, 'image-or-avatar');
|
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)
|
return this.client.registry.types.get('image').validate(value, msg, arg)
|
||||||
|| this.client.registry.types.get('user').validate(value, msg, arg);
|
|| this.client.registry.types.get('user').validate(value, msg, arg);
|
||||||
}
|
}
|
||||||
@@ -18,7 +18,7 @@ module.exports = class ImageOrAvatarArgumentType extends ArgumentType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isEmpty(value, msg, arg) {
|
isEmpty(value, msg, arg) {
|
||||||
return this.client.registry.types.get('image').isEmpty(value, msg, arg)
|
return this.client.registry.types.get('image').isEmpty(value, msg, arg)
|
||||||
|| this.client.registry.types.get('user').isEmpty(value, msg, arg);
|
|| this.client.registry.types.get('user').isEmpty(value, msg, arg);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ module.exports = class ImageArgumentType extends ArgumentType {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async parse(value, msg) {
|
parse(value, msg) {
|
||||||
const attachment = msg.attachments.first();
|
const attachment = msg.attachments.first();
|
||||||
if (attachment) return attachment.url;
|
if (attachment) return attachment.url;
|
||||||
if (fileTypeRe.test(value.toLowerCase())) return value;
|
if (fileTypeRe.test(value.toLowerCase())) return value;
|
||||||
|
|||||||
Reference in New Issue
Block a user