Skip to content

Commit

Permalink
Added Exclusive Features 😎
Browse files Browse the repository at this point in the history
  • Loading branch information
TechnoAyanOfficial committed Jun 12, 2020
1 parent 057b409 commit a1a1cc7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions userbot/plugins/_inlinebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ async def inline_handler(event):
rev_text = query[::-1]
buttons = paginate_help(0, CMD_LIST, "helpme")
result = builder.article(
Userbot Help",
text="{}\nCurrently Loaded Plugins: {}".format(
TechnoAyanBot Help",
text="{}\n🔢 Currently Loaded Plugins: {}".format(
query, len(CMD_LIST)),
buttons=buttons,
link_preview=False
Expand All @@ -36,7 +36,7 @@ async def on_plug_in_callback_query_handler(event):
# https://t.me/TelethonChat/115200
await event.edit(buttons=buttons)
else:
reply_pop_up_alert = "Get your own userbot, don't use another's\n ib @Halto_Tha for learning how to get userbot!"
reply_pop_up_alert = "Check Pinned Message in\n@TechnoAyanBot And\nGet Your Own Userbot"
await event.answer(reply_pop_up_alert, cache_time=0, alert=True)


Expand All @@ -55,7 +55,7 @@ async def on_plug_in_callback_query_handler(event):
# https://t.me/TelethonChat/115200
await event.edit(buttons=buttons)
else:
reply_pop_up_alert = "Get your own userbot, don't use another's\n ib @Halto_Tha for learning how to get userbot!"
reply_pop_up_alert = "Check Pinned Message in\n@TechnoAyanBot And\nGet Your Own Userbot"
await event.answer(reply_pop_up_alert, cache_time=0, alert=True)
@tgbot.on(events.callbackquery.CallbackQuery( # pylint:disable=E0602
data=re.compile(b"us_plugin_(.*)")
Expand All @@ -74,7 +74,7 @@ async def on_plug_in_callback_query_handler(event):
else:
reply_pop_up_alert = help_string
reply_pop_up_alert += "\n Use .unload {} to remove this plugin\n\
© Userbot".format(plugin_name)
©TechnoAyanBot".format(plugin_name)
try:
await event.answer(reply_pop_up_alert, cache_time=0, alert=True)
except:
Expand All @@ -98,7 +98,7 @@ def paginate_help(page_number, loaded_plugins, prefix):
helpable_plugins.append(p)
helpable_plugins = sorted(helpable_plugins)
modules = [custom.Button.inline(
"{} {}".format("ℹ️", x),
"{} {}".format("📖", x),
data="us_plugin_{}".format(x))
for x in helpable_plugins]
pairs = list(zip(modules[::number_of_cols], modules[1::number_of_cols]))
Expand All @@ -109,7 +109,7 @@ def paginate_help(page_number, loaded_plugins, prefix):
if len(pairs) > number_of_rows:
pairs = pairs[modulo_page * number_of_rows:number_of_rows * (modulo_page + 1)] + \
[
(custom.Button.inline("Previous", data="{}_prev({})".format(prefix, modulo_page)),
custom.Button.inline("Next", data="{}_next({})".format(prefix, modulo_page)))
(custom.Button.inline("<<Previous", data="{}_prev({})".format(prefix, modulo_page)),
custom.Button.inline("Next>>", data="{}_next({})".format(prefix, modulo_page)))
]
return pairs

0 comments on commit a1a1cc7

Please sign in to comment.