google-image npm

Status
This thread has been locked.

FelixDev

Typical Developer and Designer
Premium
Feedback score
9
Posts
1,113
Reactions
331
Resources
0
Hello, Trying to get iamge searcher for a bot,
Node stuff wont really work.
https://www.npmjs.com/package/google-images
trying to use that, but I'm unsure how to get the api and id,
Code:
      .then(images => {
        let img = images[Math.floor(Math.random() * images.length)];
        message.channel.send(img.thumbnail.url);
      });
  }
I tried to do that, but it wont send anything
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Kraezler

|Artist|Bot Dev|Animator|
Supreme
Feedback score
43
Posts
798
Reactions
246
Resources
0
Did you add this? With the correct key and CSE ID?
const GoogleImages = require('google-images');

const client = new GoogleImages('CSE ID', 'API KEY');

EDIT: I re-read the top, you need to set that or nothing will work check out https://cse.google.com/cse/
 
Last edited:

FelixDev

Typical Developer and Designer
Premium
Feedback score
9
Posts
1,113
Reactions
331
Resources
0
Did you add this? With the correct key and CSE ID?
const GoogleImages = require('google-images');

const client = new GoogleImages('CSE ID', 'API KEY');

EDIT: I re-read the top, you need to set that or nothing will work check out https://cse.google.com/cse/
I have, Im getting so pissed off, I acutally gonna shoot myself or smthing, this is sooooo fucked lol
 

FelixDev

Typical Developer and Designer
Premium
Feedback score
9
Posts
1,113
Reactions
331
Resources
0
UPDATE, SOLVED IT.
Just
upload_2018-12-14_14-34-21.png

The images are really small on discord, anyone know how to fix ?[DOUBLEPOST=1544794994][/DOUBLEPOST]FIXED LOL
 

Attachments

  • upload_2018-12-14_14-34-21.png
    upload_2018-12-14_14-34-21.png
    83.1 KB · Views: 24
Last edited:
Status
This thread has been locked.
Top