def trescelte(puno, pdue, ptre): time.sleep(4) sendmessage(chr(10067) + " Cosa volete fare?\n/1: " + puno + "\n/2: " + pdue + "\n/3: " + ptre, target_group) # Aspetta una risposta... while True: msg = getupdates() if 'text' in msg: if msg['text'] == "/1": return 1 elif msg['text'] == "/2": return 2 elif msg['text'] == "/3": return 3
def trescelte(puno, pdue, ptre): time.sleep(4) sendmessage( chr(10067) + " Cosa volete fare?\n/1: " + puno + "\n/2: " + pdue + "\n/3: " + ptre, target_group) # Aspetta una risposta... while True: msg = getupdates() if 'text' in msg: if msg['text'] == "/1": return 1 elif msg['text'] == "/2": return 2 elif msg['text'] == "/3": return 3
"legoflegend": lolfree, "getrygimage": getrygimage, "version": version, "smecds": smecds, "online": online, "steam": online, "wow": wow, "share": share } # Ciclo principale del bot print("Bot avviato!") while True: try: # Guarda il comando . msg = telegram.getupdates() # Se il messaggio non è una notifica di servizio... if 'edit' in msg: if msg['edit']: if 'text' in msg['edit_data']: # Salvatelo in una stringa text = msg['edit_data']['text'] # Guarda l'ID della chat in cui è stato inviato sentin = msg['edit_data']['chat']['id'] # ID del messaggio ricevuto source = msg['edit_data']['message_id'] if 'username' in msg['edit_data']['from']: # Salva l'username se esiste username = msg['edit_data']['from']['username'] else: # Altrimenti, salva l'userID
"lolfree": lolfree, "legoflegend": lolfree, "getrygimage": getrygimage, "version": version, "smecds": smecds, "online": online, "steam": online, "wow": wow } # Ciclo principale del bot print("Bot avviato!") while True: try: # Guarda il comando . msg = telegram.getupdates() # Se il messaggio non è una notifica di servizio... if 'edit' in msg: if msg['edit']: if 'text' in msg['edit_data']: # Salvatelo in una stringa text = msg['edit_data']['text'] # Guarda l'ID della chat in cui è stato inviato sentin = msg['edit_data']['chat']['id'] # ID del messaggio ricevuto source = msg['edit_data']['message_id'] if 'username' in msg['edit_data']['from']: # Salva l'username se esiste username = msg['edit_data']['from']['username'] else: # Altrimenti, salva l'userID