BinaryONe commited on
Commit
fef8f8a
·
1 Parent(s): 1a03f84

Version V2: Code Modification & Simplification

Browse files
YukkiMusic/plugins/play/Chat_Selecter.py CHANGED
@@ -50,6 +50,9 @@ async def callback_query_handler(client, callback_query):
50
  print(data)
51
  chat_id = data.split(' ')[1]
52
  id = data.split(' ')[0]
 
 
 
53
  details, track_id = await YouTube.track(id,True)
54
  streamtype = "nodownload"
55
  img = details["thumb"]
@@ -63,7 +66,7 @@ async def callback_query_handler(client, callback_query):
63
  video = True if check == "v" else None
64
  #print(check,video)
65
  buttons = InlineKeyboardButton("Go to Group", url='https://t.me/+MeO0kQmZ5ddiYmZl')
66
- await message.reply_photo(
67
  photo=img,
68
  caption=cap,
69
  reply_markup=InlineKeyboardMarkup([[buttons]]),
@@ -89,7 +92,7 @@ async def callback_query_handler(client, callback_query):
89
  )
90
  return await client.send_message(user_idx, f"Received err: {err}")
91
 
92
- await play_logs(message, streamtype=streamtype)
93
  #await client.send_message(user_idx, f"Received WebApp data: {web_app_data}")
94
 
95
  async def chat_selecter(client, data):
 
50
  print(data)
51
  chat_id = data.split(' ')[1]
52
  id = data.split(' ')[0]
53
+ user_id, user_idx=callback_query.from_user.id
54
+ language = await get_lang(callback_query.from_user.id)
55
+ _ = get_string(language)
56
  details, track_id = await YouTube.track(id,True)
57
  streamtype = "nodownload"
58
  img = details["thumb"]
 
66
  video = True if check == "v" else None
67
  #print(check,video)
68
  buttons = InlineKeyboardButton("Go to Group", url='https://t.me/+MeO0kQmZ5ddiYmZl')
69
+ await callback_query.message.reply_photo(
70
  photo=img,
71
  caption=cap,
72
  reply_markup=InlineKeyboardMarkup([[buttons]]),
 
92
  )
93
  return await client.send_message(user_idx, f"Received err: {err}")
94
 
95
+ await play_logs(callback_query.message, streamtype=streamtype)
96
  #await client.send_message(user_idx, f"Received WebApp data: {web_app_data}")
97
 
98
  async def chat_selecter(client, data):