added source command
This commit is contained in:
parent
b0d369db5b
commit
d9a022ea49
1 changed files with 10 additions and 3 deletions
13
main.py
13
main.py
|
@ -11,7 +11,8 @@ P = ["v", "/"]
|
||||||
COMMANDS = [
|
COMMANDS = [
|
||||||
BotCommand("help", "Get bot help"),
|
BotCommand("help", "Get bot help"),
|
||||||
BotCommand("minky", "minker"),
|
BotCommand("minky", "minker"),
|
||||||
BotCommand("sync", "(👑) Sync bot commands")
|
BotCommand("sync", "(👑) Sync bot commands"),
|
||||||
|
BotCommand("source", "View venbot-tg's source code")
|
||||||
]
|
]
|
||||||
OWNER_ID = 1911826384
|
OWNER_ID = 1911826384
|
||||||
|
|
||||||
|
@ -25,8 +26,9 @@ app = Client(
|
||||||
async def help(client, message: Message):
|
async def help(client, message: Message):
|
||||||
await message.reply("""
|
await message.reply("""
|
||||||
--You can either use the `v` prefix or the native `/` commands from Telegram. Both work the same way--
|
--You can either use the `v` prefix or the native `/` commands from Telegram. Both work the same way--
|
||||||
**help** (h) - Send this
|
**help** - Send this
|
||||||
**minky** (mink, minker) - minker
|
**minky** - minker
|
||||||
|
**source** - View venbot-tg's source code
|
||||||
**sync** 👑 - Sync slash commands
|
**sync** 👑 - Sync slash commands
|
||||||
""", parse_mode=enums.ParseMode.MARKDOWN)
|
""", parse_mode=enums.ParseMode.MARKDOWN)
|
||||||
|
|
||||||
|
@ -47,6 +49,11 @@ async def sync(client, message: Message):
|
||||||
await app.set_bot_commands(COMMANDS)
|
await app.set_bot_commands(COMMANDS)
|
||||||
await message.reply("done")
|
await message.reply("done")
|
||||||
await message.reply_chat_action(enums.ChatAction.CANCEL)
|
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
|
#endregion
|
||||||
|
|
||||||
app.run()
|
app.run()
|
Loading…
Add table
Add a link
Reference in a new issue