Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
also pull from the recent attachment form a recent image because im f…
Browse files Browse the repository at this point in the history
…uckn gay
  • Loading branch information
sr229 committed Oct 5, 2017
1 parent 123e00c commit 4385a2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/misc/saucenao/saucenao.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ exports.source = {
usage: '<url or attachment>',
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;
Expand Down

0 comments on commit 4385a2d

Please sign in to comment.