Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
684c406
1
Parent(s):
5c52c2a
Update start.py
Browse files- Powers/plugins/start.py +10 -7
Powers/plugins/start.py
CHANGED
@@ -3,7 +3,7 @@ from random import choice
|
|
3 |
from pyrogram import enums, filters
|
4 |
from pyrogram.enums import ChatMemberStatus as CMS
|
5 |
from pyrogram.enums import ChatType
|
6 |
-
from pyrogram.errors import MessageNotModified, QueryIdInvalid, UserIsBlocked
|
7 |
from pyrogram.types import (CallbackQuery, InlineKeyboardButton,
|
8 |
InlineKeyboardMarkup, Message)
|
9 |
|
@@ -249,16 +249,19 @@ Commands available:
|
|
249 |
|
250 |
|
251 |
@Gojo.on_callback_query(filters.regex("^plugins."))
|
252 |
-
async def get_module_info(
|
253 |
module = q.data.split(".", 1)[1]
|
254 |
|
255 |
help_msg = HELP_COMMANDS[f"plugins.{module}"]["help_msg"]
|
256 |
|
257 |
help_kb = HELP_COMMANDS[f"plugins.{module}"]["buttons"]
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
|
|
|
|
|
|
263 |
await q.answer()
|
264 |
return
|
|
|
3 |
from pyrogram import enums, filters
|
4 |
from pyrogram.enums import ChatMemberStatus as CMS
|
5 |
from pyrogram.enums import ChatType
|
6 |
+
from pyrogram.errors import MediaCaptionTooLong, MessageNotModified, QueryIdInvalid, UserIsBlocked
|
7 |
from pyrogram.types import (CallbackQuery, InlineKeyboardButton,
|
8 |
InlineKeyboardMarkup, Message)
|
9 |
|
|
|
249 |
|
250 |
|
251 |
@Gojo.on_callback_query(filters.regex("^plugins."))
|
252 |
+
async def get_module_info(c: Gojo, q: CallbackQuery):
|
253 |
module = q.data.split(".", 1)[1]
|
254 |
|
255 |
help_msg = HELP_COMMANDS[f"plugins.{module}"]["help_msg"]
|
256 |
|
257 |
help_kb = HELP_COMMANDS[f"plugins.{module}"]["buttons"]
|
258 |
+
try:
|
259 |
+
await q.edit_message_caption(
|
260 |
+
caption=help_msg,
|
261 |
+
parse_mode=enums.ParseMode.MARKDOWN,
|
262 |
+
reply_markup=ikb(help_kb, True, todo="commands"),
|
263 |
+
)
|
264 |
+
except MediaCaptionTooLong:
|
265 |
+
await c.send_message(chat_id=q.message.chat.id,text=help_msg,)
|
266 |
await q.answer()
|
267 |
return
|