mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Use convinience method instead
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ module.exports = class ImageArgumentType extends ArgumentType {
|
||||
return true;
|
||||
}
|
||||
if (fileTypeRe.test(value.toLowerCase())) {
|
||||
if (!validURL.isHttpUri(value) && !validURL.isHttpsUri(value)) return false;
|
||||
if (!validURL.isWebUri(value)) return false;
|
||||
try {
|
||||
await request.get(value);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user