Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update inline.py #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
172 changes: 86 additions & 86 deletions Branded/modules/helpers/inline.py
Original file line number Diff line number Diff line change
@@ -1,86 +1,86 @@
import asyncio
from ... import *
from .buttons import *
from .wrapper import *
from pyrogram.types import *
async def help_menu_logo(answer):
image = None
if image:
thumb_image = image
else:
thumb_image = "https://te.legra.ph/file/11cfa74175b590014bd16.jpg"
button = paginate_plugins(0, plugs, "help")
answer.append(
InlineQueryResultPhoto(
photo_url=f"{thumb_image}",
title="🥀 Help Menu ✨",
thumb_url=f"{thumb_image}",
description=f"🥀 Open Help Menu Of Branded-Userbot ✨...",
caption=f"""
**🥀 Welcome To Help Menu Of
Branded Userbot » {__version__} ✨...
Click On Below 🌺 Buttons To
Get Userbot Commands.
🌷Powered By : [Branded](https://t.me/BRANDED_PAID_CC).**
""",
reply_markup=InlineKeyboardMarkup(button),
)
)
return answer
async def help_menu_text(answer):
from ... import __version__
button = paginate_plugins(0, plugs, "help")
answer.append(
InlineQueryResultArticle(
title="🥀 Help Menu ✨",
input_message_content=InputTextMessageContent(f"""
**🥀 Welcome To Help Menu Of
Branded Userbot » {__version__} ✨...
Click On Below 🌺 Buttons To
Get Userbot Commands.
🌷Powered By : [Branded](https://t.me/BRANDED_PAID_CC).**""",
disable_web_page_preview=True
),
reply_markup=InlineKeyboardMarkup(button),
)
)
return answer
async def run_async_inline():
@bot.on_inline_query()
@inline_wrapper
async def inline_query_handler(bot, query):
text = query.query
if text.startswith("help_menu_logo"):
answer = []
answer = await help_menu_logo(answer)
try:
await bot.answer_inline_query(
query.id, results=answer, cache_time=10
)
except Exception as e:
print(str(e))
return
elif text.startswith("help_menu_text"):
answer = []
answer = await help_menu_text(answer)
try:
await bot.answer_inline_query(
query.id, results=answer, cache_time=10
)
except Exception as e:
print(str(e))
return
else:
return
import asyncio

from ... import *
from .buttons import *
from .wrapper import *
from pyrogram.types import *


async def help_menu_logo(answer):
image = None
if image:
thumb_image = image
else:
thumb_image = "https://telegra.ph/file/70a9de40d206782967c72.jpg"
button = paginate_plugins(0, plugs, "help")
answer.append(
InlineQueryResultPhoto(
photo_url=f"{thumb_image}",
title="🥀 Help Menu ✨",
thumb_url=f"{thumb_image}",
description=f"🥀 Open Help Menu Of Rise-Userbot ✨...",
caption=f"""
**🥀 Welcome To Help Menu Of
Branded Userbot » {__version__} ✨...

Click On Below 🌺 Buttons To
Get Userbot Commands.

🌷Powered By : [Hari](https://t.me/Rise_Ownerr).**
""",
reply_markup=InlineKeyboardMarkup(button),
)
)
return answer


async def help_menu_text(answer):
from ... import __version__
button = paginate_plugins(0, plugs, "help")
answer.append(
InlineQueryResultArticle(
title="🥀 Help Menu ✨",
input_message_content=InputTextMessageContent(f"""
**🥀 Welcome To Help Menu Of
Rise Userbot » {__version__} ✨...

Click On Below 🌺 Buttons To
Get Userbot Commands.

🌷Powered By : [Hari](https://t.me/Rise_Ownerr).**""",
disable_web_page_preview=True
),
reply_markup=InlineKeyboardMarkup(button),
)
)
return answer


async def run_async_inline():
@bot.on_inline_query()
@inline_wrapper
async def inline_query_handler(bot, query):
text = query.query
if text.startswith("help_menu_logo"):
answer = []
answer = await help_menu_logo(answer)
try:
await bot.answer_inline_query(
query.id, results=answer, cache_time=10
)
except Exception as e:
print(str(e))
return
elif text.startswith("help_menu_text"):
answer = []
answer = await help_menu_text(answer)
try:
await bot.answer_inline_query(
query.id, results=answer, cache_time=10
)
except Exception as e:
print(str(e))
return
else:
return