简体   繁体   English

Telegram Bot 从 Google Drive 下载文件

[英]Telegram Bot to Download files from Google Drive

我如何利用我的电报机器人(node.js 电报机器人 API)发送保存在我的谷歌驱动器文件夹中的随机图像

You must first learn to use the Google drive API: Here is the documentation您必须首先学习使用 Google Drive API:这里是文档

I think you can do like this :我认为你可以这样做:

  1. Get the file ID of all your images and put these ID into a list获取所有图像的文件 ID 并将这些 ID 放入列表中
  2. Generate a random index for the list of IDs为 ID 列表生成一个随机索引
  3. Download the image and send it with the api of telegram下载图片并用telegram的api发送

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM