From 01b86b0e1b0e174f9a3c29457e99dc14b1de8dc7 Mon Sep 17 00:00:00 2001 From: stef-devs Date: Sat, 18 Jun 2022 12:02:15 +0200 Subject: [PATCH] Change name variables --- index.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index.py b/index.py index 9c635d4..c2a8805 100644 --- a/index.py +++ b/index.py @@ -39,11 +39,11 @@ print("Il bot si è avviato con successo!") #Command /start @bot.message_handler(commands=['start']) def send_welcome(message): - chat = message.chat.id + chat_id = message.chat.id print("Triggered command START.") - bot.send_photo(message.chat.id, photo='https://i.imgur.com/6YPJBze.png') + bot.send_photo(chat_id, photo='https://i.imgur.com/6YPJBze.png') messageText = "✋ Benvenuto su RetniNet!\n\nRetniNet è un bot privato per automatizzare e semplificare cose che facciamo quotidianamente. \n\n👨‍💻 Creato & sviluppato da @Stef58_Official" - bot.send_message(chat,messageText, parse_mode="HTML") + bot.send_message(chat_id,messageText, parse_mode="HTML") #Command /music @bot.message_handler(commands=['music']) @@ -72,7 +72,6 @@ def music_step(pm): }], } url = pm.text - video = url send_message = "🎶 Stiamo scaricando la canzone attenda..." bot.send_message(pm.chat.id, send_message) with YoutubeDL(ytdl_opts) as ydl: