Skip to content

Latest commit

 

History

History
executable file
·
45 lines (40 loc) · 2.44 KB

File metadata and controls

executable file
·
45 lines (40 loc) · 2.44 KB

📡 獲取 Telegram 憑證與指令設定 / Getting Telegram Credentials and Command Setup

要讓您的私人網盤運作,您需要與 Telegram 官方 API 建立連線。 To get your private cloud drive running, you need to establish a connection with the official Telegram API.

第一步:獲取 API_ID 與 API_HASH / Step 1: Get API_ID and API_HASH

  1. 登入 my.telegram.orgLog in to my.telegram.org.
  2. 點擊 "API development tools"Click "API development tools".
  3. 填寫 App title 與 Short name (例如:MyPrivateDrive)。 Fill in App title and Short name (e.g., MyPrivateDrive).
  4. 點擊 "Create application",您會得到一組 api_idapi_hashClick "Create application", and you will receive an api_id and api_hash.
    • 用途:這是讓您的程式能像真人一樣「監聽」訊息的通行證。 - Purpose: This is the pass that allows your program to "listen" to messages like a real person.

第二步:建立機器人 (Bot Token) / Step 2: Create a Bot (Bot Token)

  1. 在 Telegram 搜尋 @BotFatherSearch for @BotFather on Telegram.
  2. 發送 /newbot 並設定名字。 Send /newbot and set a name.
  3. 複製得到的 HTTP API TokenCopy the provided HTTP API Token.

第三步:設定機器人指令清單 (重要) / Step 3: Set Up Bot Command List (Important)

為了方便在手機端操作,請設定指令快捷選單: To facilitate operations on mobile devices, please set up the command shortcut menu:

  1. 在 BotFather 對話框發送 /setcommandsSend /setcommands in the BotFather chat.
  2. 選擇您的機器人。 Select your bot.
  3. 發送以下文字: Send the following text:
    savdb - 索引檔案到資料庫 (回覆訊息使用) / Index file to database (Reply to message)
    
  4. 設定完成後,您在對話框輸入 / 就會看到快捷選項。 Once set up, typing / in the chat will show the shortcut options.

第四步:獲取 Chat ID / Step 4: Get Chat ID

  • 您的檔案存儲群組 ID 必須以 -100 開頭。 Your file storage group ID must start with -100.
  • 您可以透過 @userinfobot 來獲取目標群組的 ID。 You can obtain the target group's ID through @userinfobot.