如何发送随机主题图片?

我现在正在编码Discord Bot,该Boud应该随机发送Picutes或Gif 例如随机壁纸,随机Gif,动漫Gif 或类似的东西... 有人知道吗? 我的编码语言是JavaScript。

评论
  • 之冰巧
    之冰巧 回复

    You could use something like unsplash or something similar to search for the specific search term.

    To send the images as an attachment in discord.js, you can get the image or send the URL of the image:

    channel.send({
      files: [search_image_url_or_buffer]
    })