-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshazam_bot_with_help.py
More file actions
27 lines (23 loc) · 898 Bytes
/
shazam_bot_with_help.py
File metadata and controls
27 lines (23 loc) · 898 Bytes
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
from pyrogram import Client, filters
# Initialize your Pyrogram client
app = Client("your_bot_token")
# Define the help command handler
@app.on_message(filters.command(["help"]))
async def help_command(client, message):
# Define the help message with usage format
help_message = (
"Welcome to the bot!\n\n"
"To use this bot, you can send the following commands:\n"
"/start - Start using the bot\n"
"/help - Show this help message\n"
"/shazam - Identify a song by sending a voice message\n"
"\n"
"Usage format:\n"
"To identify a song, simply send a voice message to the bot.\n\n"
"To start the bot, run the following command in your terminal:\n"
"`python shazam_bot.py`"
)
# Send the help message to the user
await message.reply_text(help_message, parse_mode="markdown")
# Run the bot
app.run()