-2

I'm very new to js/discord js and I want to make a basic discord bot that sends a picture of a capybara to a channel every hour but I have no idea how, I have one that sends the same phrase every hour so I'm assuming it stops sending random images from the search "capybara" in google images could be relatively similar.

client.on('ready', () => {
  var testChannel = client.channels.cache.find(channel => channel.id === '1034340669197668432');

  setInterval(() => {
    testChannel.send("Te pisan Dennis");
  },    1800000);

});

I have tried to find a code that I can understand to use as a base but I have not had any luck

  • 3
    Tried searching some libraries up? [This one](https://www.npmjs.com/package/google-images) seems promising. – kelsny Nov 04 '22 at 04:27

1 Answers1

0

You could use a package (https://www.npmjs.com/package/google-images like caTS said) or if you are as new to djs you could try getting a random image from pre-set ones as it may be easier.

When I search things like "google image search nodejs" I see some things that might be helpful, you could also try that.