diff --git a/.github/scripts/post.py b/.github/scripts/post.py index 507459a..c977b38 100755 --- a/.github/scripts/post.py +++ b/.github/scripts/post.py @@ -151,35 +151,22 @@ def get_info(ID): } # Prepare function for posting message in channel -def send_post(chat_id, image, caption, button): - return bot.send_photo(chat_id=chat_id, photo=image, caption=caption, reply_markup=button) +def send_post(chat_id, image, caption): + return bot.send_photo(chat_id=chat_id, photo=image, caption=caption) # Prepare message format for channel def message_content(information): msg = "" - msg += f"DroidX-UI NewHorizon {information['version']} // {information['oem']} {information['device_name']} ({information['codename']})\n\n" - msg += f"Maintainer: {information['maintainer']}\n" - msg += f"Build Date: {information['datetime']} UTC\n" - msg += f"Build Variant: {information['buildtype']}\n" - msg += f"MD5: {information['md5']}\n\n" - msg += f"Screenshots: Here\n" - msg += f"Rom Support: Channel | Group\n" - msg += f"Device Support: Here\n" - msg += f"Donate: droidxuiofficial@oksbi\n" + msg += f"DXUI Eris // {information['oem']} {information['device_name']} ({information['codename']})\n\n" + msg += f"Download ({information['buildtype']}): Here\n" + msg += f"Screenshots: Here\n\n" + msg += f"-> Maintainer: {information['maintainer']}\n" + msg += f"-> DXUI Version: {information['version']}\n" + msg += f"-> Changelog: Here\n" - msg += f"\n#NewHorizon #{information['codename']} #Android14 #Official" + msg += f"\n#Eris #{information['codename']} #Android14 #Official" return msg -# Prepare buttons for message -def button(information): - buttons = InlineKeyboardMarkup() - buttons.row_width = 2 - button1 = InlineKeyboardButton(text="Download", url=f"{information['download']}") - button2 = InlineKeyboardButton(text="Installation", url=f"https://github.com/DroidX-UI-Devices/vendor_droidxOTA/blob/14/Installation/{information['codename']}.md") - button3 = InlineKeyboardButton(text="Rom Changelogs", url=f"https://github.com/DroidX-UI/Release_changelogs/blob/14/DroidX-Changelogs.mk") - button4 = InlineKeyboardButton(text="Release Notes", url=f"https://github.com/DroidX-UI-Devices/vendor_droidxOTA/blob/14/changelogs/{information['codename']}.md") - return buttons.add(button1, button2, button3, button4) - # Send updates to channel and commit changes in repo def tg_message(): commit_message = "Update new IDs and push OTA" @@ -193,7 +180,7 @@ def tg_message(): for devices in get_diff(get_new_id(), get_old_id()): info = get_info(devices) with open(BANNER_PATH, "rb") as image: - send_post(CHAT_ID, image, message_content(info), button(info)) + send_post(CHAT_ID, image, message_content(info)) commit_description += f"- {info['device_name']} ({info['codename']})\n" sleep(5) update(get_new_id())