azils3's picture
Upload 216 files
618430a verified
# Ultroid - UserBot
# Copyright (C) 2021-2025 TeamUltroid
#
# This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
# PLease read the GNU Affero General Public License in
# <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
from . import *
START = """
πŸͺ… **Help Menu** πŸͺ…
✘ /start : Check I am Alive or not.
✘ /help : Get This Message.
✘ /repo : Get Bot's Repo..
πŸ§‘β€πŸ’» Join **@TeamUltroid**
"""
ADMINTOOLS = """✘ **AdminTools** ✘
β€’ /pin : Pins the Replied Message
β€’ /pinned : Get Pinned message in chat.
β€’ /unpin : Unpin the Replied message
β€’ /unpin all : Unpin all Pinned Messages.
β€’ /ban (username/id/reply) : Ban the User
β€’ /unban (username/id/reply) : UnBan the User.
β€’ /mute (username/id/reply) : Mute the User.
β€’ /unmute (username/id/reply) : Unmute the User.
β€’ /tban (username/id/reply) (time) : Temporary ban a user
β€’ /tmute (username/id/reply) (time) : temporary Mutes a User.
β€’ /purge (purge messages)
β€’ /setgpic (reply photo) : keep Chat Photo of Group.
β€’ /delgpic : remove current chat Photo."""
UTILITIES = """
✘ ** Utilities ** ✘
β€’ /info (reply/username/id) : get detailed info of user.
β€’ /id : get chat/user id.
β€’ /tr : Translate Languages..
β€’ /q : Create Quotes.
β€’ /paste (reply file/text) : paste content on Spaceb.in
β€’ /meaning (text) : Get Meaning of that Word.
β€’ /google (query) : Search Something on Google..
β€’ /suggest (query/reply) : Creates a Yes / No Poll.
"""
LOCKS = """
✘ ** Locks ** ✘
β€’ /lock (query) : lock particular content in chat.
β€’ /unlock (query) : Unlock some content.
β€’ All Queries
- `msgs` : for messages.
- `inlines` : for inline queries.
- `media` : for all medias.
- `games` : for games.
- `sticker` : for stickers.
- `polls` : for polls.
- `gif` : for gifs.
- `pin` : for pins.
- `changeinfo` : for change info right.
"""
MISC = """
✘ **Misc** ✘
β€’ /joke : Get Random Jokes.
β€’ /decide : Decide Something..
**✘ Stickertools ✘**
β€’ /kang : add sticker to your pack.
β€’ /listpack : get all of yours pack..
"""
STRINGS = {"Admintools": ADMINTOOLS, "locks": LOCKS, "Utils": UTILITIES, "Misc": MISC}
MNGE = udB.get_key("MNGR_EMOJI") or "β€’"
def get_buttons():
BTTS = []
keys = STRINGS.copy()
while keys:
BT = []
for i in list(keys)[:2]:
text = f"{MNGE} {i} {MNGE}"
BT.append(Button.inline(text, f"hlp_{i}"))
del keys[i]
BTTS.append(BT)
url = f"https://t.me/{asst.me.username}?startgroup=true"
BTTS.append([Button.url("Add me to Group", url)])
return BTTS
@asst_cmd(pattern="help")
async def helpish(event):
if not event.is_private:
url = f"https://t.me/{asst.me.username}?start=start"
return await event.reply(
"Contact me in PM for help!", buttons=Button.url("Click me for Help", url)
)
if str(event.sender_id) in owner_and_sudos() and (
udB.get_key("DUAL_MODE") and (udB.get_key("DUAL_HNDLR") == "/")
):
return
await event.reply(START, buttons=get_buttons())
@callback("mngbtn", owner=True)
async def ehwhshd(e):
buttons = get_buttons()
buttons.append([Button.inline("<< Back", "open")])
await e.edit(buttons=buttons)
@callback("mnghome")
async def home_aja(e):
await e.edit(START, buttons=get_buttons())
@callback(re.compile("hlp_(.*)"))
async def do_something(event):
match = event.pattern_match.group(1).strip().decode("utf-8")
await event.edit(STRINGS[match], buttons=Button.inline("<< Back", "mnghome"))