mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-11 03:14:35 +02:00
isEmpty
This commit is contained in:
@@ -25,6 +25,11 @@ class ImageArgumentType extends ArgumentType {
|
||||
}
|
||||
return msg.attachments.first().url;
|
||||
}
|
||||
|
||||
isEmpty(value, msg) {
|
||||
if (!msg.attachments.size) return !value;
|
||||
return Boolean(msg.attachments.size);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ImageArgumentType;
|
||||
|
||||
Reference in New Issue
Block a user