要讓您的私人網盤運作,您需要與 Telegram 官方 API 建立連線。 To get your private cloud drive running, you need to establish a connection with the official Telegram API.
- 登入 my.telegram.org。 Log in to my.telegram.org.
- 點擊 "API development tools"。 Click "API development tools".
- 填寫 App title 與 Short name (例如:
MyPrivateDrive)。 Fill in App title and Short name (e.g.,MyPrivateDrive). - 點擊 "Create application",您會得到一組
api_id與api_hash。 Click "Create application", and you will receive anapi_idandapi_hash.- 用途:這是讓您的程式能像真人一樣「監聽」訊息的通行證。 - Purpose: This is the pass that allows your program to "listen" to messages like a real person.
- 在 Telegram 搜尋 @BotFather。 Search for @BotFather on Telegram.
- 發送
/newbot並設定名字。 Send/newbotand set a name. - 複製得到的
HTTP API Token。 Copy the providedHTTP API Token.
為了方便在手機端操作,請設定指令快捷選單: To facilitate operations on mobile devices, please set up the command shortcut menu:
- 在 BotFather 對話框發送
/setcommands。 Send/setcommandsin the BotFather chat. - 選擇您的機器人。 Select your bot.
- 發送以下文字:
Send the following text:
savdb - 索引檔案到資料庫 (回覆訊息使用) / Index file to database (Reply to message) - 設定完成後,您在對話框輸入
/就會看到快捷選項。 Once set up, typing/in the chat will show the shortcut options.
- 您的檔案存儲群組 ID 必須以
-100開頭。 Your file storage group ID must start with-100. - 您可以透過 @userinfobot 來獲取目標群組的 ID。 You can obtain the target group's ID through @userinfobot.