mirror of
https://github.com/omg-xtao/ytdlbot.git
synced 2025-01-30 17:58:36 +00:00
add ping check for heroku
This commit is contained in:
parent
b7733fbc9f
commit
6a76d832f8
@ -1,6 +1,6 @@
|
||||
# ytdlbot
|
||||
|
||||
YouTube Download🚀
|
||||
YouTube Download Bot🚀
|
||||
|
||||
Download videos from YouTube and other platforms through a Telegram Bot
|
||||
|
||||
|
25
app.json
25
app.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "YouTube-Downloader",
|
||||
"description": "A Telegrambot to download youtube video",
|
||||
"repository": "https://github.com/tgbot-collection/ytdl-bot",
|
||||
"repository": "https://github.com/tgbot-collection/ytdlbot",
|
||||
"logo": "https://avatars.githubusercontent.com/u/73354211?s=200&v=4",
|
||||
"keywords": [
|
||||
"telegram",
|
||||
@ -10,22 +10,31 @@
|
||||
"env": {
|
||||
"TOKEN": {
|
||||
"description": "Bot token",
|
||||
"value": "bot32313"
|
||||
"value": "token"
|
||||
},
|
||||
"APP_ID": {
|
||||
"description": "APP_ID",
|
||||
"value": "5155161"
|
||||
"description": "APP ID",
|
||||
"value": "12345"
|
||||
},
|
||||
"APP_HASH": {
|
||||
"description": "APP_HASH",
|
||||
"value": "3131"
|
||||
"description": "APP HASH",
|
||||
"value": "12345abc"
|
||||
},
|
||||
"OWNER": {
|
||||
"description": "Your telegram username",
|
||||
"value": "username",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"formation": {
|
||||
|
||||
"worker": {
|
||||
"quantity": 1,
|
||||
"size": "free"
|
||||
}
|
||||
}
|
||||
},
|
||||
"buildpacks": [
|
||||
{
|
||||
"url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git"
|
||||
}
|
||||
]
|
||||
}
|
4
ytdl.py
4
ytdl.py
@ -77,8 +77,8 @@ def help_handler(client: "Client", message: "types.Message"):
|
||||
def ping_handler(client: "Client", message: "types.Message"):
|
||||
chat_id = message.chat.id
|
||||
client.send_chat_action(chat_id, "typing")
|
||||
if os.uname().sysname == "Darwin":
|
||||
bot_info = "test"
|
||||
if os.uname().sysname == "Darwin" or ".heroku" in os.getenv("PYTHONHOME", ""):
|
||||
bot_info = "ping unavailable."
|
||||
else:
|
||||
bot_info = get_runtime("botsrunner_ytdl_1", "YouTube-dl")
|
||||
if message.chat.username == OWNER:
|
||||
|
Loading…
Reference in New Issue
Block a user