本Bot基于PY3,请先安装PY3,推荐使用宝塔的PY项目管理器
目录
准备工作
- 安装Python 3.7+(推荐最新版3.8)
- 下载gclone
- 自行熟悉gclone,并获得包含服务帐户身份信息的json
- 申请一个Telegram Bot,并取得token
- 获取自己的电报ID,可以通过这个机器人
安装
下载ZIP版本或通过git clone下载
git clone https://github.com/BlueSkyXN/gclonebotontg
cd telegram_gcloner
通过requirements.txt安装依赖
pip3 install -r requirements.txt
复制config.ini.example
并更名为config.ini
修改对应的内容(建议使用宝塔面板操作),
包括:
path_to_gclone = gclone.exe路径(Linux各发行版如通过安装的方式获取,可不填。Win如已加入path也不填)
telegram_token =电报机器人令牌
user_ids =您的电报ID(多个以英文逗号替换,第一个ID为管理员)
如有兴趣可调整./utils/restricted.py
里的权限,替代为只回应user_ids
里的用户
运行
- 运行
telegram_gcloner.py
。 - 向机器人上传包含SA的ZIP文件,并在信息标题填写
/sa
。手机用户可先上传ZIP文件,再回复该信息/sa
。 - 向机器人发送
/folders
设定常用文件夹。 - 向机器人发送或转发带有Google Drive链接的信息,按提示操作。
注意,默认的启动程序在root中的telegram_gcloner中的telegram_gcloner目录下,快速启动命令为
cd telegram_gcloner && cd telegram_gcloner && python3 telegram_gcloner.py
Comments NOTHING