Ultroid - v0.0.4

ChangeLog - https://t.me/TheUltroid/26
This commit is contained in:
Aditya
2021-03-13 17:26:44 +05:30
committed by GitHub
parent a104e40539
commit cb317c5a72
56 changed files with 2800 additions and 631 deletions

View File

@@ -5,7 +5,6 @@
# PLease read the GNU Affero General Public License in
# <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
import os
import random
import re
import time
@@ -23,33 +22,13 @@ from . import *
# ================================================#
notmine = "This bot is for {}".format(OWNER_NAME)
ULTROID_PIC = "https://telegra.ph/file/11245cacbffe92e5d5b14.jpg"
helps = """
[Uʟᴛʀɪᴅ Sᴘᴘʀᴛ](t.me/ultroidsupport)
**Hᴇʟᴘ Mᴇɴ{}.
ɢɪɴs ~ {}**
"""
helps = get_string("inline_1")
add_ons = udB.get("ADDONS")
if add_ons:
zhelps = """
[Uʟᴛʀɪᴅ Sᴘᴘʀᴛ](t.me/ultroidsupport)
**Hᴇʟᴘ Mᴇɴ{}.
Aᴅᴅɴs ~ {}**
"""
zhelps = get_string("inline_2")
else:
zhelps = """
[Uʟᴛʀɪᴅ Sᴘᴘʀᴛ](t.me/ultroidsupport)
**Hᴇʟᴘ Mᴇɴ{}.
Aᴅᴅɴs ~ {}
G Aɴᴅ Aᴅᴅ ADDONS Vᴀʀ Wɪᴛʜ Vᴀʟᴇ Tʀᴇ**
"""
zhelps = get_string("inline_3")
# ============================================#
@@ -59,15 +38,7 @@ async def e(o):
if len(o.text) == 0:
b = o.builder
uptime = grt((time.time() - start_time))
ALIVEMSG = """
**The Ultroid Userbot...**\n
✵ **Owner** - `{}`
✵ **Ultroid** - `{}`
✵ **UpTime** - `{}`
✵ **Python** - `{}`
✵ **Telethon** - `{}`
✵ **Branch** - `{}`
""".format(
ALIVEMSG = get_string("alive_1").format(
OWNER_NAME,
ultroid_version,
uptime,
@@ -119,7 +90,9 @@ if Var.BOT_USERNAME is not None and asst is not None:
description="Help Menu - UserBot | Telethon ",
url="https://t.me/TheUltroid",
thumb=InputWebDocument(ULTROID_PIC, 0, "image/jpeg", []),
text=f"** Bᴛ Oғ {OWNER_NAME}\n\nMᴀɪɴ Mᴇɴ\n\nɢɪɴs ~ {len(PLUGINS) - 4}\nAᴅᴅɴs ~ {len(ADDONS)}\nTᴛᴀʟ Cᴍᴍᴀɴᴅs ~ {cmd}**",
text=get_string("inline_4").format(
OWNER_NAME, len(PLUGINS) - 5, len(ADDONS), cmd
),
buttons=[
[
Button.inline("• Pʟɢɪɴs", data="hrrrr"),
@@ -201,42 +174,43 @@ if Var.BOT_USERNAME is not None and asst is not None:
"Pʟᴀʏ Sᴛʀᴇ Aᴘᴘs",
query="app telegram",
same_peer=True,
)
],
[
),
Button.switch_inline(
"Mᴅᴅᴇᴅ Aᴘᴘs",
query="mods minecraft",
same_peer=True,
)
),
],
[
Button.switch_inline(
"Sᴇᴀʀʜ Oɴ Gɢʟᴇ",
query="go TeamUltroid",
same_peer=True,
)
],
[
),
Button.switch_inline(
"Sᴇᴀʀʜ Oɴ Yᴀʜ",
query="yahoo TeamUltroid",
same_peer=True,
)
),
],
[
Button.switch_inline(
"YTʙᴇ Dɴʟᴀᴅᴇʀ",
query="Ed Sheeran Perfect",
query="yt Ed Sheeran Perfect",
same_peer=True,
)
],
[
Button.switch_inline(
"Rᴇx Tᴇsᴛᴇʀ",
query="rex",
same_peer=True,
),
Button.switch_inline(
"ɪᴘAʀᴛ Sᴇᴀʀʜ",
query="clipart frog",
same_peer=True,
)
),
],
[
Button.inline(
@@ -250,7 +224,7 @@ if Var.BOT_USERNAME is not None and asst is not None:
@callback("hrrrr")
@owner
async def on_plug_in_callback_query_handler(event):
xhelps = helps.format(OWNER_NAME, len(PLUGINS) - 4)
xhelps = helps.format(OWNER_NAME, len(PLUGINS) - 5)
buttons = paginate_help(0, PLUGINS, "helpme")
await event.edit(f"{xhelps}", buttons=buttons, link_preview=False)
@@ -263,7 +237,7 @@ if Var.BOT_USERNAME is not None and asst is not None:
await event.edit(f"{halp}", buttons=buttons, link_preview=False)
else:
await event.answer(
"Iɴsᴛᴀʟʟ A Pʟɢɪɴ Mᴀɴᴀʟʟʏ Oʀ Aᴅᴅ Vᴀʀ ADDONS Wɪᴛʜ Vᴀʟᴇ True",
f"Tʏᴘᴇ `{HNDLR}setredis ADDONS True`\n T ɢᴇᴛ ᴀᴅᴅɴs ᴘʟɢɪɴs",
cache_time=0,
alert=True,
)
@@ -320,7 +294,7 @@ if Var.BOT_USERNAME is not None and asst is not None:
@callback("back")
@owner
async def backr(event):
xhelps = helps.format(OWNER_NAME, len(PLUGINS) - 4)
xhelps = helps.format(OWNER_NAME, len(PLUGINS) - 5)
current_page_number = int(upage)
buttons = paginate_help(current_page_number, PLUGINS, "helpme")
await event.edit(f"{xhelps}", buttons=buttons, link_preview=False)
@@ -363,7 +337,9 @@ if Var.BOT_USERNAME is not None and asst is not None:
z.append(y)
cmd = len(z) + 10
await event.edit(
f"** Bᴛ Oғ {OWNER_NAME}\n\nMᴀɪɴ Mᴇɴ\n\nɢɪɴs ~ {len(PLUGINS) - 4}\nAᴅᴅɴs ~ {len(ADDONS)}\nTᴛᴀʟ Cᴍᴍᴀɴᴅs ~ {cmd}**",
get_string("inline_4").format(
OWNER_NAME, len(PLUGINS) - 5, len(ADDONS), cmd
),
buttons=buttons,
link_preview=False,
)
@@ -372,7 +348,7 @@ if Var.BOT_USERNAME is not None and asst is not None:
@owner
async def on_plug_in_callback_query_handler(event):
await event.edit(
"**Mᴇɴ Hᴀs Bᴇᴇɴ Cʟsᴇᴅ**",
get_string("inline_5"),
buttons=Button.inline("Oᴘᴇɴ Mᴀɪɴ Mᴇɴ Aɢᴀɪɴ", data="open"),
)