This commit is contained in:
Dragon Fire
2020-06-15 16:07:24 -04:00
parent 8e9f7a49f9
commit e480c094aa
-1
View File
@@ -10,7 +10,6 @@ module.exports = class ImageArgumentType extends ArgumentType {
async validate(value, msg, arg) {
const attachment = msg.attachments.first();
if (attachment) {
if (!attachment.height || !attachment.width) return false;
if (attachment.size > 8e+6) return 'Please provide an image under 8 MB.';
if (!fileTypeRe.test(attachment.name)) return 'Please only send PNG, JPG, BMP, or GIF format images.';
return true;