diff --git a/.github/runOnRelease.py b/.github/runOnRelease.py index 5b74903dd..a537b71b3 100644 --- a/.github/runOnRelease.py +++ b/.github/runOnRelease.py @@ -5,14 +5,12 @@ from pyrogram.types import ( InputMediaDocument, ) from requests import get -from tgconfig import TG_API_HASH, TG_API_ID, TG_CID, TG_TOKEN +from tgconfig import TG_API_HASH, TG_API_ID, TG_TOKEN url = "https://api.github.com/repos/Libre-Tube/LibreTube/releases/latest" req = get(url).json() - -if TG_CID.isdecimal(): - TG_CID = int(TG_CID) +TG_CHANNEL = "LibreTube" def get_changelog(): @@ -56,9 +54,9 @@ for file in _files: caption = f"**LibreTube {tag} // Privacy Simplified**\n\nWhat's Changed?\n```{get_changelog()}```" with Client("bot", TG_API_ID, TG_API_HASH, bot_token=TG_TOKEN) as app: app.send_photo( - TG_CID, + TG_CHANNEL, "https://i.ibb.co/LJ9r4hP/LT.jpg", caption, reply_markup=buttons, ) - app.send_media_group(TG_CID, files) + app.send_media_group(TG_CHANNEL, files) diff --git a/.github/workflows/run-on-release.yml b/.github/workflows/run-on-release.yml index 0426ca5e0..9d6664f30 100644 --- a/.github/workflows/run-on-release.yml +++ b/.github/workflows/run-on-release.yml @@ -18,7 +18,6 @@ jobs: git clone https://github.com/${{ github.repository }} && cd LibreTube echo "TG_API_ID = '${{ secrets.TG_API_ID }}'" >> tgconfig.py echo "TG_API_HASH = '${{ secrets.TG_API_HASH }}'" >> tgconfig.py - echo "TG_CID = '${{ secrets.TG_CID }}'" >> tgconfig.py echo "TG_TOKEN = '${{ secrets.TG_TOKEN }}'" >> tgconfig.py pip install pyrogram TgCrypto requests mv .github/runOnRelease.py .