Files
Ultroid-fork/plugins/_ultroid.py
Anonymous 8931530658 fixes
Co-authored-by: Aditya <me@xditya.me>
Co-authored-by: Danish <72792730+1Danish-00@users.noreply.github.com>
Co-authored-by: buddhhu <buddhuu0@users.noreply.github.com>
Co-authored-by: sppidy <sppidy@users.noreply.github.com>
Co-authored-by: Arnab Paryali <Arnabxd@users.noreply.github.com>
2021-03-13 19:37:29 +05:30

29 lines
796 B
Python

# Ultroid - UserBot
# Copyright (C) 2020 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 ChatSendInlineForbiddenError
from . import *
REPOMSG = (
"• **ULTROID USERBOT** •\n\n",
"• Repo - [Click Here](https://github.com/TeamUltroid/Ultroid)\n",
"• Support - @UltroidSupport",
)
@ultroid_cmd(pattern="repo$")
async def repify(e):
try:
q = await ultroid_bot.inline_query(Var.BOT_USERNAME, "repo")
await q[0].click(e.chat_id)
if e.sender_id == ultroid_bot.uid:
await e.delete()
except ChatSendInlineForbiddenError:
await eor(e, REPOMSG)