diff --git a/bot.py b/bot.py index 176604b6..94636925 100644 --- a/bot.py +++ b/bot.py @@ -35,4 +35,4 @@ while(True): telegram.sendMessage(chr(9888) + " Non hai specificato un gioco! [Visualizza tutte le offerte](https://isthereanydeal.com/#/search:.;/scroll:%23gamelist).", sby) elif(cmd[0].startswith('/rage')): print('/rage') - telegram.sendAudio("BQADAgAD3wEAAh8GgAE6ZnLP5_gFMwI", sby) \ No newline at end of file + telegram.sendDocument("BQADAgAD3wEAAh8GgAE6ZnLP5_gFMwI", sby) \ No newline at end of file diff --git a/telegram.py b/telegram.py index e4db4a20..2d69cfc8 100644 --- a/telegram.py +++ b/telegram.py @@ -44,14 +44,14 @@ def forwardMessage(msg, sentby, to): #Manda la richiesta ai server di Telegram. requests.get("https://api.telegram.org/bot" + telegramtoken + "/forwardMessage", params=parametri) -def sendAudio(audio, to): +def sendDocument(doc, to): """Manda un audio a una chat.""" parametri = { 'chat_id': to, - 'audio': audio, + 'document': doc, } #Manda la richiesta ai server di Telegram. - requests.get("https://api.telegram.org/bot" + telegramtoken + "/sendAudio", params=parametri) + requests.get("https://api.telegram.org/bot" + telegramtoken + "/sendDocument", params=parametri) def sendLocation(lat, long, to): """Manda una posizione sulla mappa."""