ci: Fixed build information

This commit is contained in:
ShirkNeko
2025-11-15 12:47:11 +08:00
parent 3cfc6d6a31
commit 83209a5259
7 changed files with 6 additions and 55 deletions

View File

@@ -2,6 +2,7 @@ import asyncio
import os
import sys
from telethon import TelegramClient
from telethon.sessions import StringSession
API_ID = 611335
API_HASH = "d524b414d21f4d37f08684c1df41ac9c"
@@ -73,11 +74,11 @@ def check_environ():
if BRANCH is None:
print("[-] Invalid BRANCH")
exit(1)
if MESSAGE_THREAD_ID is None and MESSAGE_THREAD_ID != "":
if MESSAGE_THREAD_ID and MESSAGE_THREAD_ID != "":
try:
MESSAGE_THREAD_ID = int(MESSAGE_THREAD_ID)
except:
print("[-] Invaild MESSAGE_THREAD_ID")
print("[-] Invalid MESSAGE_THREAD_ID")
exit(1)
else:
MESSAGE_THREAD_ID = None
@@ -92,9 +93,7 @@ async def main():
print("[-] No files to upload")
exit(1)
print("[+] Logging in Telegram with bot")
script_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
session_dir = os.path.join(script_dir, "ksubot")
async with await TelegramClient(session=session_dir, api_id=API_ID, api_hash=API_HASH).start(bot_token=BOT_TOKEN) as bot:
async with await TelegramClient(StringSession(), API_ID, API_HASH).start(bot_token=BOT_TOKEN) as bot:
caption = [""] * len(files)
caption[-1] = get_caption()
print("[+] Caption: ")