Spaces:
Paused
Paused
BinaryONe commited on
Commit ·
343d0af
1
Parent(s): 09bae0b
Version V2: Code Modification & Simplification
Browse files
YukkiMusic/plugins/play/Chat_Selecter.py
CHANGED
|
@@ -47,7 +47,7 @@ from YukkiMusic import app
|
|
| 47 |
@app.on_callback_query()
|
| 48 |
async def callback_query_handler(client, callback_query):
|
| 49 |
data = callback_query.data
|
| 50 |
-
print(data,callback_query)
|
| 51 |
|
| 52 |
split_data=data.split(' ')[0]
|
| 53 |
id = data.split(' ')[1]
|
|
@@ -113,8 +113,8 @@ async def chat_selecter(client, data):
|
|
| 113 |
except Exception as e:
|
| 114 |
print(f"Error fetching chat info for chat ID {chat.id}: {e}")"""
|
| 115 |
chat_list=[
|
| 116 |
-
{ "text": "Only Logs [ Updates Group ]", "callback_data": f"{data} {int(-1002090110322)}"},
|
| 117 |
-
{ "text": "Me & Her", "callback_data": f"{data} {int(-1001847684787)}"}
|
| 118 |
]
|
| 119 |
for button in chat_list:
|
| 120 |
button_list.append(
|
|
|
|
| 47 |
@app.on_callback_query()
|
| 48 |
async def callback_query_handler(client, callback_query):
|
| 49 |
data = callback_query.data
|
| 50 |
+
print(data, callback_query)
|
| 51 |
|
| 52 |
split_data=data.split(' ')[0]
|
| 53 |
id = data.split(' ')[1]
|
|
|
|
| 113 |
except Exception as e:
|
| 114 |
print(f"Error fetching chat info for chat ID {chat.id}: {e}")"""
|
| 115 |
chat_list=[
|
| 116 |
+
{ "text": "Only Logs [ Updates Group ]", "callback_data": f"{data.get('split_data')} {data.get('id')} {int(-1002090110322)}"},
|
| 117 |
+
{ "text": "Me & Her", "callback_data": f"{data.get('split_data')} {data.get('id')} {int(-1001847684787)}"}
|
| 118 |
]
|
| 119 |
for button in chat_list:
|
| 120 |
button_list.append(
|
YukkiMusic/plugins/play/webapp.py
CHANGED
|
@@ -90,9 +90,9 @@ async def raw_update_handler(client, message: Message):
|
|
| 90 |
_ = get_string(language)
|
| 91 |
user_id = message.from_user.id
|
| 92 |
user_name = message.from_user.first_name
|
| 93 |
-
|
| 94 |
|
| 95 |
-
button_list=await chat_selecter(client,
|
| 96 |
await client.send_message(chat_id=user_idx, text="Choose an option:", reply_markup=InlineKeyboardMarkup([button_list]))
|
| 97 |
#video_url=f'https://www.youtube.com/watch?v={id}'
|
| 98 |
|
|
|
|
| 90 |
_ = get_string(language)
|
| 91 |
user_id = message.from_user.id
|
| 92 |
user_name = message.from_user.first_name
|
| 93 |
+
|
| 94 |
|
| 95 |
+
button_list=await chat_selecter(client, {"split_data":split_data,"id":id} )
|
| 96 |
await client.send_message(chat_id=user_idx, text="Choose an option:", reply_markup=InlineKeyboardMarkup([button_list]))
|
| 97 |
#video_url=f'https://www.youtube.com/watch?v={id}'
|
| 98 |
|