mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +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;
|
return true;
|
||||||
}
|
}
|
||||||
if (fileTypeRe.test(value.toLowerCase())) {
|
if (fileTypeRe.test(value.toLowerCase())) {
|
||||||
if (!validURL.isHttpUri(value) && !validURL.isHttpsUri(value)) return false;
|
if (!validURL.isWebUri(value)) return false;
|
||||||
try {
|
try {
|
||||||
await request.get(value);
|
await request.get(value);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user