Files
Ultroid-fork/plugins/_ultroid.py
Devesh Pal 6c7af44f09 Ultroid v0.1 Updates 13.09.2021
Co-authored-by: Danish <danish@ultroid.tech>
Co-authored-by: Aditya <me@xditya.me>
Co-authored-by: Amit Sharma <48654350+buddhhu@users.noreply.github.com>
Co-authored-by: sppidy <sppidy@users.noreply.github.com>
Co-authored-by: Arnab Paryali <Arnabxd@users.noreply.github.com>
Co-authored-by: divkix <divkix@users.noreply.github.com>
Co-authored-by: hellboi_atul <hellboi-atul@users.noreply.github.com>
Co-authored-by: Programming Error <error@notavailable.live>
2021-09-13 01:03:39 +05:30

66 lines
1.8 KiB
Python

# Ultroid - UserBot
# Copyright (C) 2021 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 telethon.errors import (
BotMethodInvalidError,
ChatSendInlineForbiddenError,
ChatSendMediaForbiddenError,
)
from . import *
REPOMSG = """
• **ULTROID USERBOT** •\n
• Repo - [Click Here](https://github.com/TeamUltroid/Ultroid)
• Addons - [Click Here](https://github.com/TeamUltroid/UltroidAddons)
• Support - @UltroidSupport
"""
RP_BUTTONS = [
[
Button.url("Repo", "https://github.com/TeamUltroid/Ultroid"),
Button.url("Addons", "https://github.com/TeamUltroid/UltroidAddons"),
],
[Button.url("Support Group", "t.me/ultroidsupport")],
]
ULTSTRING = """🎇 **Thanks for Deploying Ultroid Userbot!**
• Here, are the Some Basic stuff from, where you can Know, about its Usage."""
@ultroid_cmd(
pattern="repo$",
type=["official", "manager"],
)
async def repify(e):
try:
q = await e.client.inline_query(asst.me.username, "")
await q[0].click(e.chat_id)
return await e.delete()
except (
ChatSendInlineForbiddenError,
ChatSendMediaForbiddenError,
BotMethodInvalidError,
):
pass
except Exception as er:
LOGS.info("Error while repo command : " + str(er))
await eor(e, REPOMSG)
@ultroid_cmd(pattern="ultroid")
async def useUltroid(rs):
button = Button.inline("Start >>", "initft_2")
msg = await asst.send_message(
LOG_CHANNEL,
ULTSTRING,
file="https://telegra.ph/file/54a917cc9dbb94733ea5f.jpg",
buttons=button,
)
await eor(rs, f"**[Click Here]({msg.message_link})**")