From 371d1848d11139039296da24f958ff6886b3c9c4 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Sun, 7 Nov 2021 18:02:28 +0700 Subject: [PATCH 1/6] upgrade --- runtime.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime.txt b/runtime.txt index 2153d1e..fadb070 100644 --- a/runtime.txt +++ b/runtime.txt @@ -1 +1 @@ -python-3.9.7 +python-3.10.0 From df1d5821c055a1b7a2cb59ea7e046931c2897fed Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Sun, 7 Nov 2021 18:08:03 +0700 Subject: [PATCH 2/6] none --- program/music.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/program/music.py b/program/music.py index ab95515..f7e09b9 100644 --- a/program/music.py +++ b/program/music.py @@ -103,7 +103,7 @@ async def play(c: Client, m: Message): try: await user.join_chat(m.chat.username) except Exception as e: - await m.reply_text(f"❌ **userbot failed to join**\n\n**reason**:{e}") + await m.reply_text(f"❌ **userbot failed to join**\n\n**reason**: `{e}`") return else: try: @@ -114,7 +114,7 @@ async def play(c: Client, m: Message): pass except Exception as e: return await m.reply_text( - f"❌ **userbot failed to join**\n\n**reason**:{e}" + f"❌ **userbot failed to join**\n\n**reason**: `{e}`" ) if replied: @@ -312,7 +312,7 @@ async def stream(c: Client, m: Message): try: await user.join_chat(m.chat.username) except Exception as e: - await m.reply_text(f"❌ **userbot failed to join**\n\n**reason**:{e}") + await m.reply_text(f"❌ **userbot failed to join**\n\n**reason**: `{e}`") return else: try: @@ -323,7 +323,7 @@ async def stream(c: Client, m: Message): pass except Exception as e: return await m.reply_text( - f"❌ **userbot failed to join**\n\n**reason**:{e}" + f"❌ **userbot failed to join**\n\n**reason**: `{e}`" ) if len(m.command) < 2: From 381288caa8d8d908510b9fb474b97aaab25b45a3 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Sun, 7 Nov 2021 18:09:10 +0700 Subject: [PATCH 3/6] none --- program/video.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/program/video.py b/program/video.py index 31984fd..7e42f84 100644 --- a/program/video.py +++ b/program/video.py @@ -109,7 +109,7 @@ async def vplay(c: Client, m: Message): try: await user.join_chat(m.chat.username) except Exception as e: - await m.reply_text(f"❌ **userbot failed to join**\n\n**reason**:{e}") + await m.reply_text(f"❌ **userbot failed to join**\n\n**reason**: `{e}`") return else: try: @@ -120,7 +120,7 @@ async def vplay(c: Client, m: Message): pass except Exception as e: return await m.reply_text( - f"❌ **userbot failed to join**\n\n**reason**: {e}" + f"❌ **userbot failed to join**\n\n**reason**: `{e}`" ) if replied: @@ -342,7 +342,7 @@ async def vstream(c: Client, m: Message): try: await user.join_chat(m.chat.username) except Exception as e: - await m.reply_text(f"❌ **userbot failed to join**\n\n**reason**:{e}") + await m.reply_text(f"❌ **userbot failed to join**\n\n**reason**: `{e}`") return else: try: @@ -353,7 +353,7 @@ async def vstream(c: Client, m: Message): pass except Exception as e: return await m.reply_text( - f"❌ **userbot failed to join**\n\n**reason**:{e}" + f"❌ **userbot failed to join**\n\n**reason**: `{e}`" ) if len(m.command) < 2: From 79f76faac2b2104b50b1736560c1907bdc0ae667 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Sun, 7 Nov 2021 18:52:30 +0700 Subject: [PATCH 4/6] none --- program/admins.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/program/admins.py b/program/admins.py index 23102a8..7b99c4b 100644 --- a/program/admins.py +++ b/program/admins.py @@ -188,12 +188,12 @@ async def cbpause(_, query: CallbackQuery): try: await call_py.pause_stream(chat_id) await query.edit_message_text( - "⏸ streaming has paused", reply_markup=bttn + "⏸ the streaming has paused", reply_markup=bttn ) except Exception as e: await query.edit_message_text(f"🚫 **error:**\n\n`{e}`", reply_markup=bcl) else: - await query.edit_message_text("❌ **nothing in streaming**", reply_markup=bcl) + await query.answer("❌ nothing is currently streaming", show_alert=True) @Client.on_callback_query(filters.regex("cbresume")) @@ -208,12 +208,12 @@ async def cbresume(_, query: CallbackQuery): try: await call_py.resume_stream(chat_id) await query.edit_message_text( - "▶️ streaming has resumed", reply_markup=bttn + "▶️ the streaming has resumed", reply_markup=bttn ) except Exception as e: await query.edit_message_text(f"🚫 **error:**\n\n`{e}`", reply_markup=bcl) else: - await query.edit_message_text("❌ **nothing in streaming**", reply_markup=bcl) + await query.answer("❌ nothing is currently streaming", show_alert=True) @Client.on_callback_query(filters.regex("cbstop")) @@ -228,11 +228,11 @@ async def cbstop(_, query: CallbackQuery): try: await call_py.leave_group_call(chat_id) clear_queue(chat_id) - await query.edit_message_text("✅ **streaming has ended**", reply_markup=bcl) + await query.edit_message_text("✅ **the streaming has ended**", reply_markup=bcl) except Exception as e: await query.edit_message_text(f"🚫 **error:**\n\n`{e}`", reply_markup=bcl) else: - await query.edit_message_text("❌ **nothing in streaming**", reply_markup=bcl) + await query.answer("❌ nothing is currently streaming", show_alert=True) @Client.on_callback_query(filters.regex("cbmute")) @@ -252,7 +252,7 @@ async def cbmute(_, query: CallbackQuery): except Exception as e: await query.edit_message_text(f"🚫 **error:**\n\n`{e}`", reply_markup=bcl) else: - await query.edit_message_text("❌ **nothing in streaming**", reply_markup=bcl) + await query.answer("❌ nothing is currently streaming", show_alert=True) @Client.on_callback_query(filters.regex("cbunmute")) @@ -272,7 +272,7 @@ async def cbunmute(_, query: CallbackQuery): except Exception as e: await query.edit_message_text(f"🚫 **error:**\n\n`{e}`", reply_markup=bcl) else: - await query.edit_message_text("❌ **nothing in streaming**", reply_markup=bcl) + await query.answer("❌ nothing is currently streaming", show_alert=True) @Client.on_message( From 8fb87886e6bbab872b3297885d7b67b78e02d24f Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Sun, 7 Nov 2021 19:09:20 +0700 Subject: [PATCH 5/6] added more button button (#40 ) --- program/music.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/program/music.py b/program/music.py index f7e09b9..db7342f 100644 --- a/program/music.py +++ b/program/music.py @@ -5,7 +5,7 @@ import asyncio import re -from config import ASSISTANT_NAME, BOT_USERNAME, IMG_1, IMG_2 +from config import ASSISTANT_NAME, BOT_USERNAME, IMG_1, IMG_2, UPDATES_CHANNEL from driver.filters import command, other_filters from driver.queues import QUEUE, add_to_queue from driver.veez import call_py, user @@ -59,6 +59,8 @@ async def play(c: Client, m: Message): [ InlineKeyboardButton(text="• Mᴇɴᴜ", callback_data="cbmenu"), InlineKeyboardButton(text="• Cʟᴏsᴇ", callback_data="cls"), + ],[ + InlineKeyboardButton(text="✨ Cʜᴀɴɴᴇʟ", url=f"https://t.me/{UPDATES_CHANNEL}"), ] ] ) @@ -268,6 +270,8 @@ async def stream(c: Client, m: Message): [ InlineKeyboardButton(text="• Mᴇɴᴜ", callback_data="cbmenu"), InlineKeyboardButton(text="• Cʟᴏsᴇ", callback_data="cls"), + ],[ + InlineKeyboardButton(text="✨ Cʜᴀɴɴᴇʟ", url=f"https://t.me/{UPDATES_CHANNEL}"), ] ] ) From 89d024c6bf7a9a275ff997705d3d9bd5cc8a20b9 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Sun, 7 Nov 2021 19:10:33 +0700 Subject: [PATCH 6/6] added more button button (#40 ) --- program/video.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/program/video.py b/program/video.py index 7e42f84..0f7a516 100644 --- a/program/video.py +++ b/program/video.py @@ -5,7 +5,7 @@ import asyncio import re -from config import ASSISTANT_NAME, BOT_USERNAME, IMG_1, IMG_2 +from config import ASSISTANT_NAME, BOT_USERNAME, IMG_1, IMG_2, UPDATES_CHANNEL from driver.filters import command, other_filters from driver.queues import QUEUE, add_to_queue from driver.veez import call_py, user @@ -65,6 +65,8 @@ async def vplay(c: Client, m: Message): [ InlineKeyboardButton(text="• Mᴇɴᴜ", callback_data="cbmenu"), InlineKeyboardButton(text="• Cʟᴏsᴇ", callback_data="cls"), + ],[ + InlineKeyboardButton(text="✨ Cʜᴀɴɴᴇʟ", url=f"https://t.me/{UPDATES_CHANNEL}"), ] ] ) @@ -298,6 +300,8 @@ async def vstream(c: Client, m: Message): [ InlineKeyboardButton(text="• Mᴇɴᴜ", callback_data="cbmenu"), InlineKeyboardButton(text="• Cʟᴏsᴇ", callback_data="cls"), + ],[ + InlineKeyboardButton(text="✨ Cʜᴀɴɴᴇʟ", url=f"https://t.me/{UPDATES_CHANNEL}"), ] ] )