From 78556ef6d22ea5037b498b9607f7d6eeb6f14353 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 12 Jan 2021 22:28:59 -0600 Subject: [PATCH] add missing comma.... --- music.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/music.py b/music.py index a22b9d2..3949bcb 100755 --- a/music.py +++ b/music.py @@ -46,7 +46,7 @@ def start(update, context: CallbackContext): def help(update, context: CallbackContext): """Send a message when the command /help is issued.""" - update.message.reply_markdown(f"Attention! I am an inline bot only!\n\nStart your message with @MusicServiceBot and then the name of the song you want me to search spotify for. Wait for a few seconds and you should get {num_results} results back.\nIf spotify provides a preview for the song, when you tap the correct result you'll get a 30 second preview for the song, otherwise its just the name of the song. Once you pick the right result you'll get a button that says `Show links`. When you click on this it'll search GPM and Youtube for the song and will show the links.\n*This takes a bit, please be patient. If you wait more than 3 days, the button probably won't work. To fix that please search again.*") + update.message.reply_markdown(f"Attention! I am an inline bot only!\n\nStart your message with @MusicServiceBot and then the name of the song you want me to search spotify for. Wait for a few seconds and you should get {num_results} results back.\nIf spotify provides a preview for the song, when you tap the desired result you'll get a 30 second preview for the song, otherwise its just the name of the song. Once you pick the right result you'll get a button for Spotify and more links that goes to a link aggregation site that will have links to most other services.") def inlinequery(update, context: CallbackContext): @@ -75,7 +75,7 @@ def inlinequery(update, context: CallbackContext): sp_link = dpath.util.get(sp_info, f"/tracks/items/[{i}]/external_urls/spotify") songlink = "https://song.link/{0}".format(sp_link) - reply_markup = InlineKeyboardMarkup([[InlineKeyboardButton("Spotify", url = sp_link) InlineKeyboardButton("More", url = songlink)]]) + reply_markup = InlineKeyboardMarkup([[InlineKeyboardButton("Spotify", url = sp_link), InlineKeyboardButton("More", url = songlink)]]) description = f"By {sp_artist} on the album {sp_albname}, released {sp_albdate}" @@ -109,8 +109,6 @@ def main(): # on noncommand i.e message - echo the message on Telegram bot.add_handler(InlineQueryHandler(inlinequery)) - bot.add_handler(CallbackQueryHandler(button)) - # log all errors bot.add_error_handler(error)