LibreTube/.github/tg.py

20 lines
595 B
Python
Raw Normal View History

2022-06-12 00:47:52 +05:30
import telegram
from tgconfig import TG_TOKEN
2022-06-12 23:11:49 +05:30
from json import load
f = open('commit.json')
data = load(f)
2022-06-12 00:47:52 +05:30
TG_CHAT_ID = "-1001537505605"
2022-06-12 01:35:01 +05:30
bot = telegram.Bot(TG_TOKEN)
2022-06-12 00:47:52 +05:30
2022-06-12 23:39:14 +05:30
bot.send_photo(TG_CHAT_ID, open('alpha.png', 'rb'), f'''Libretube {data['sha'][0:7]} // Alpha
2022-06-12 23:32:36 +05:30
{data['commit']['message']}
2022-06-12 23:39:14 +05:30
''')
2022-06-12 00:47:52 +05:30
bot.send_document(TG_CHAT_ID, open('app-arm64-v8a-debug.apk', 'rb'))
bot.send_document(TG_CHAT_ID, open('app-armeabi-v7a-debug.apk', 'rb'))
bot.send_document(TG_CHAT_ID, open('app-x86_64-debug.apk', 'rb'))
2022-06-12 23:32:36 +05:30
bot.send_document(TG_CHAT_ID, open('app-x86-debug.apk', 'rb'))
f.close()