add missing comma....

This commit is contained in:
David Daily 2021-01-12 22:28:59 -06:00
parent 7db7621c3d
commit 78556ef6d2

View File

@ -46,7 +46,7 @@ def start(update, context: CallbackContext):
def help(update, context: CallbackContext): def help(update, context: CallbackContext):
"""Send a message when the command /help is issued.""" """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): 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") sp_link = dpath.util.get(sp_info, f"/tracks/items/[{i}]/external_urls/spotify")
songlink = "https://song.link/{0}".format(sp_link) 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}" 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 # on noncommand i.e message - echo the message on Telegram
bot.add_handler(InlineQueryHandler(inlinequery)) bot.add_handler(InlineQueryHandler(inlinequery))
bot.add_handler(CallbackQueryHandler(button))
# log all errors # log all errors
bot.add_error_handler(error) bot.add_error_handler(error)