added source command

This commit is contained in:
nin0dev 2024-07-19 16:08:35 -04:00
parent b0d369db5b
commit d9a022ea49

13
main.py
View file

@ -11,7 +11,8 @@ P = ["v", "/"]
COMMANDS = [
BotCommand("help", "Get bot help"),
BotCommand("minky", "minker"),
BotCommand("sync", "(👑) Sync bot commands")
BotCommand("sync", "(👑) Sync bot commands"),
BotCommand("source", "View venbot-tg's source code")
]
OWNER_ID = 1911826384
@ -25,8 +26,9 @@ app = Client(
async def help(client, message: Message):
await message.reply("""
--You can either use the `v` prefix or the native `/` commands from Telegram. Both work the same way--
**help** (h) - Send this
**minky** (mink, minker) - minker
**help** - Send this
**minky** - minker
**source** - View venbot-tg's source code
**sync** 👑 - Sync slash commands
""", parse_mode=enums.ParseMode.MARKDOWN)
@ -47,6 +49,11 @@ async def sync(client, message: Message):
await app.set_bot_commands(COMMANDS)
await message.reply("done")
await message.reply_chat_action(enums.ChatAction.CANCEL)
@app.on_message(filters.command(["source", "sc"], prefixes=P))
async def source(client, message: Message):
await message.reply("I am free software! You can look at my code on https://git.nin0.dev/nin0/venbot-tg", disable_web_page_preview=True)
#endregion
app.run()