File size: 3,579 Bytes
618430a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# 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"))
|