From 4385a2d51e9863db3a7a9fb4e2519b774edc01ab Mon Sep 17 00:00:00 2001 From: Capuccino Date: Thu, 5 Oct 2017 02:19:29 +0000 Subject: [PATCH] also pull from the recent attachment form a recent image because im fuckn gay --- src/cmd/misc/saucenao/saucenao.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/misc/saucenao/saucenao.js b/src/cmd/misc/saucenao/saucenao.js index 2d581e44..64dd2f71 100644 --- a/src/cmd/misc/saucenao/saucenao.js +++ b/src/cmd/misc/saucenao/saucenao.js @@ -23,7 +23,7 @@ exports.source = { usage: '', main(bot, ctx) { return new Promise((resolve, reject) => { - if (!ctx.attachments[0] && (!ctx.suffix || !urlRegex.test(ctx.suffix))) { + if (!ctx.attachments[0] || ctx.attachments[1] && (!ctx.suffix || !urlRegex.test(ctx.suffix))) { ctx.createMessage('Please provide an image.').then(resolve).catch(reject); } else { let url = ctx.attachments[0] ? ctx.attachments[0].url : ctx.suffix;