well .. i have no idea on how to send you a msg.. or where ask for help about your project...
so sorry if i made something wrong .. writing this msg as issue!!!!
well.. i dont know anything about python... but i know something of php.. mysql.. and visual basic..
so.. i try to understand as best as i can...
well.. right now .. im not stil able to ANSWER...
for example :
/start
please select a feature from A , B, C ... at this point i cant grab the answer... and i cannot find a tutorial on how TO DO THAT...
i tried to do something like that.. but i (obviously) FAILED...
this is the "amazing" code i tried....
`import sys
import random
import traceback
import telepot
from telepot.delegate import per_chat_id, create_open
works well till it ask me "dammi un comando".. then when i write "sposta"...
it answers me "Scusa.. mi aspetto un pin numerico..."... That's so sad!!
please help me to understand how to manage this answers!!!!
well .. i have no idea on how to send you a msg.. or where ask for help about your project... so sorry if i made something wrong .. writing this msg as issue!!!!
well.. i dont know anything about python... but i know something of php.. mysql.. and visual basic.. so.. i try to understand as best as i can...
well.. right now .. im not stil able to ANSWER... for example : /start
please select a feature from A , B, C ... at this point i cant grab the answer... and i cannot find a tutorial on how TO DO THAT... i tried to do something like that.. but i (obviously) FAILED... this is the "amazing" code i tried....
`import sys import random import traceback import telepot from telepot.delegate import per_chat_id, create_open
def handle(msg): flavor = telepot.flavor(msg) if flavor == 'normal': content_type, chat_type, chat_id = telepot.glance(msg) print 'Normal Message:', content_type, chat_type, chat_id self.sender.sendMessage('MESSAGGIO DI TESTO NORMALE')
class Player(telepot.helper.ChatHandler): def init(self, seed_tuple, timeout): super(Player, self).init(seed_tuple, timeout) self._answer = int('6594')
def open(self, initial_msg, seed): self.sender.sendMessage('Dimmi il tuo pin') return True
def on_chat_message(self, msg): content_type, chat_type, chat_id = telepot.glance(msg)
def on_close(self, exception): if isinstance(exception, telepot.helper.WaitTooLong): self.sender.sendMessage('Tempo scaduto') TOKEN = 'Token....'
bot = telepot.DelegatorBot(TOKEN, [ (per_chat_id(), create_open(Player, timeout=30)), ]) bot.notifyOnMessage(run_forever=True) `
works well till it ask me "dammi un comando".. then when i write "sposta"... it answers me "Scusa.. mi aspetto un pin numerico..."... That's so sad!! please help me to understand how to manage this answers!!!!