rayzrdev / SharpBot

A Discord.js selfbot written by Rayzr - 60 second installation!
https://git.io/sharpbot
MIT License
129 stars 134 forks source link

Google Image search? #49

Closed TheNightRider12 closed 5 years ago

TheNightRider12 commented 7 years ago

Would it be possible to add a google image search function/command? Such as //gsearch pie and then have it pull up a few pie images. or something like that.

abyss commented 7 years ago

It's possible to allow for one image, but I think having it post more than one image would result in kinda spammy behavior - posting multiple posts in response to one post.

What do you think, @Rayzr522?

TheNightRider12 commented 7 years ago

Could it be kind of like the current google search? like maybe have 2 rows or 3 items each row? 2 down and 3 across?

rayzr522 commented 7 years ago

You can only show one image per embed. Showing multiple images would mean sending multiple embeds, and that's quite spammy.

Baecon commented 7 years ago

why dont you do it in a notsobot style where the reactions become a button to switch the picture, go back, or stop responding to reaction

Baecon commented 7 years ago

http://i.imgur.com/W9CsCCA.png

rayzr522 commented 7 years ago

Yes, that is a possibility. I believe @yonilerner is working on creating a system for giving people the option of providing a Google API key, allowing them to use commands that require the Google APIs.

yonilerner commented 7 years ago

The framework Ill be building will allow any manager, command, etc. to "register" a new optional config parameter, and then said manager, command, etc. would run if that config parameter was provided. So for a google image search command, in addition to the usual run and info exports, the file would also provide a configRequirements export, which would be an array of config names that the command requires to run. The command would only run if those requirements were met, and if they were, the run function would be passed a fourth argument consisting of a key/value map of all the config requirements for that command.

This is just an example of how it might work; I havent fully decided on implementation and interface yet.