|
| 1 | +# 🤖 Telegram Auto Sign |
| 2 | + |
| 3 | +An automated daily sign-in script for Telegram bots, powered by GitHub Actions and Python (Telethon). It uses your personal account (Userbot) to send sign-in commands (like `/qd`) to specified Telegram bots daily, completely freeing your hands. |
| 4 | + |
| 5 | +## ✨ Core Features |
| 6 | +* **☁️ Zero-Cost Deployment**: Runs entirely on GitHub Actions. No need for a local server or VPS. |
| 7 | +* **👥 Multi-Bot Support**: Capable of sending sign-in commands to multiple bots sequentially. |
| 8 | +* **🎲 Smart Anti-Ban System**: Built-in 1~20 minutes randomized startup delay and random pauses between messages to prevent triggering Telegram's spam filters. |
| 9 | +* **📝 Auto-Log Keepalive**: Automatically writes sign-in results to `checkin.log` and pushes it to the repository after each run. This perfectly bypasses GitHub Actions' 60-day inactivity suspension rule. |
| 10 | + |
| 11 | +## 🚀 Deployment Guide |
| 12 | + |
| 13 | +### Step 1: Get API Credentials |
| 14 | +1. Log in to the [Telegram API Development Tools](https://my.telegram.org/). |
| 15 | +2. Create a new application. |
| 16 | +3. Note down your `App api_id` and `App api_hash`. |
| 17 | + |
| 18 | +### Step 2: Get Session String |
| 19 | +Install the dependency (`pip install telethon`) on your local machine and run a script to generate your session string. |
| 20 | +> ⚠️ **WARNING**: Treat your Session String like a password. NEVER share it publicly! |
| 21 | +
|
| 22 | +### Step 3: Configure GitHub Repository Secrets |
| 23 | +1. Create a **Private** repository (Highly recommended for security). |
| 24 | +2. Go to `Settings` -> `Secrets and variables` -> `Actions`, and add the following 4 **Repository secrets**: |
| 25 | + * `API_ID`: Your API ID (Numbers only). |
| 26 | + * `API_HASH`: Your API Hash string. |
| 27 | + * `SESSION_STRING`: The extremely long session string generated in Step 2. |
| 28 | + * `BOT_USERNAME`: The target bot usernames, separated by commas (e.g., `@bot1, @bot2`). |
| 29 | + |
| 30 | +### Step 4: Grant Action Permissions |
| 31 | +To allow the script to push the log file back to the repository: |
| 32 | +1. Go to `Settings` -> `Actions` -> `General`. |
| 33 | +2. Scroll down to **Workflow permissions**. |
| 34 | +3. Select **Read and write permissions** and click `Save`. |
| 35 | + |
| 36 | +### Step 5: First Run & Test |
| 37 | +Go to the **Actions** tab, select the `Telegram Auto Sign` workflow on the left, and click `Run workflow` to test it manually. If successful, your account will send the commands, and a log file will appear in your repository! |
| 38 | + |
| 39 | +--- |
| 40 | + |
| 41 | +## ⏱️ Schedule Modification |
| 42 | +The default trigger time is **00:00 UTC daily**. |
| 43 | +To modify this, edit the cron expression in the `.github/workflows/checkin.yml` file. |
| 44 | + |
| 45 | +## ⚠️ Disclaimer |
| 46 | +This script is for educational and automated testing purposes only. Do not use it for high-frequency spamming or violating Telegram's Terms of Service. The user bears all responsibility for any account restrictions or bans caused by API abuse. |
0 commit comments