Spaces:
Running
Running
BinaryONe
commited on
Commit
·
458bb26
1
Parent(s):
7c5fb88
Callback Update
Browse files
FileStream/bot/plugins/FileHandlers/callback.py
CHANGED
@@ -117,11 +117,11 @@ async def cb_data(bot: Client, update: CallbackQuery):
|
|
117 |
parse_mode=ParseMode.HTML,
|
118 |
disable_web_page_preview=True,
|
119 |
reply_markup=InlineKeyboardMarkup([
|
120 |
-
[InlineKeyboardButton("Movie", callback_data=f"{'privup' if upload_type =='PRIVATE' else 'pubup'}_{
|
121 |
-
[InlineKeyboardButton("WebSeries", callback_data=f"{'privup' if upload_type =='PRIVATE' else 'pubup'}_{
|
122 |
-
[InlineKeyboardButton("Anime", callback_data=f"{'privup' if upload_type =='PRIVATE' else 'pubup'}_{
|
123 |
-
[InlineKeyboardButton("Documentary", callback_data=f"{'privup' if upload_type =='PRIVATE' else 'pubup'}_{
|
124 |
-
[InlineKeyboardButton("Regular", callback_data=f"{'privup' if upload_type =='PRIVATE' else 'pubup'}_{
|
125 |
[ InlineKeyboardButton("ᴄʟᴏsᴇ", callback_data="close")]
|
126 |
]),
|
127 |
)
|
|
|
117 |
parse_mode=ParseMode.HTML,
|
118 |
disable_web_page_preview=True,
|
119 |
reply_markup=InlineKeyboardMarkup([
|
120 |
+
[InlineKeyboardButton("Movie", callback_data=f"{'privup' if upload_type =='PRIVATE' else 'pubup'}_{user_id}_{message_id}_Movie")],
|
121 |
+
[InlineKeyboardButton("WebSeries", callback_data=f"{'privup' if upload_type =='PRIVATE' else 'pubup'}_{user_id}_{message_id}_WebSeries")],
|
122 |
+
[InlineKeyboardButton("Anime", callback_data=f"{'privup' if upload_type =='PRIVATE' else 'pubup'}_{user_id}_{message_id}_Anime")],
|
123 |
+
[InlineKeyboardButton("Documentary", callback_data=f"{'privup' if upload_type =='PRIVATE' else 'pubup'}_{user_id}_{message_id}_Documentary")],
|
124 |
+
[InlineKeyboardButton("Regular", callback_data=f"{'privup' if upload_type =='PRIVATE' else 'pubup'}_{user_id}_{message_id}_Regular")],
|
125 |
[ InlineKeyboardButton("ᴄʟᴏsᴇ", callback_data="close")]
|
126 |
]),
|
127 |
)
|
FileStream/bot/plugins/FileHandlers/stream.py
CHANGED
@@ -68,12 +68,13 @@ async def private_receive_handler(bot: Client, message: Message):
|
|
68 |
file_info=get_file_info(message, instruction)
|
69 |
reply_markup, stream_text = await upload_type_func(get_file_info(message, instruction),reply)
|
70 |
await reply.edit_text(text=stream_text,
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
except FloodWait as e:
|
76 |
print(f"Sleeping for {str(e.value)}s")
|
|
|
77 |
await asyncio.sleep(e.value)
|
78 |
await bot.send_message(
|
79 |
chat_id=Telegram.ULOG_CHANNEL,
|
|
|
68 |
file_info=get_file_info(message, instruction)
|
69 |
reply_markup, stream_text = await upload_type_func(get_file_info(message, instruction),reply)
|
70 |
await reply.edit_text(text=stream_text,
|
71 |
+
parse_mode=ParseMode.HTML,
|
72 |
+
disable_web_page_preview=True,
|
73 |
+
reply_markup=reply_markup,
|
74 |
+
)
|
75 |
except FloodWait as e:
|
76 |
print(f"Sleeping for {str(e.value)}s")
|
77 |
+
|
78 |
await asyncio.sleep(e.value)
|
79 |
await bot.send_message(
|
80 |
chat_id=Telegram.ULOG_CHANNEL,
|
FileStream/utils/FileProcessors/bot_utils.py
CHANGED
@@ -105,6 +105,7 @@ async def upload_type_func(file_info,replied_message):
|
|
105 |
return reply_markup, stream_text
|
106 |
|
107 |
else:
|
|
|
108 |
stream_text = LANG.STREAM_TEXT_Y.format(file_info['file']['file_name'],humanbytes(file_info['file']['file_size']))
|
109 |
reply_markup = InlineKeyboardMarkup([[
|
110 |
InlineKeyboardButton(
|
|
|
105 |
return reply_markup, stream_text
|
106 |
|
107 |
else:
|
108 |
+
|
109 |
stream_text = LANG.STREAM_TEXT_Y.format(file_info['file']['file_name'],humanbytes(file_info['file']['file_size']))
|
110 |
reply_markup = InlineKeyboardMarkup([[
|
111 |
InlineKeyboardButton(
|