def on_enter_ask_pheno_state7(self, event): print("I'm entering state7") sender_id = event['sender']['id'] global_config.set_state(sender_id, 'ask_pheno_state7') send.forecast_3day(sender_id, global_config.get_zone(sender_id), 'Wx') self.go_to(event)
def on_enter_oneweek_state4(self, event): print("I'm entering state4") sender_id = event['sender']['id'] global_config.set_state(sender_id, 'oneweek_state4') send.forecast_1week(sender_id, global_config.get_zone(sender_id)) self.go_to(event)
def on_enter_ask_temp_state5(self, event): print("I'm entering state5") sender_id = event['sender']['id'] global_config.set_state(sender_id, 'ask_temp_state5') send.forecast_3day_temp(sender_id, global_config.get_zone(sender_id)) self.go_to(event)
def on_enter_ask_rain_state6(self, event): print("I'm entering state6") sender_id = event['sender']['id'] global_config.set_state(sender_id, 'ask_rain_state6') send.forecast_3day(sender_id, global_config.get_zone(sender_id), 'PoP6h') self.go_to(event)
def on_enter_ask_interval_state2(self, event): print("I'm entering state2") sender_id = event['sender']['id'] user_zone = global_config.get_zone(sender_id) send.send_start(sender_id, "你選的是 {0}".format(user_zone)) global_config.set_state(sender_id, 'ask_interval_state2') send.send_quick_replies(sender_id, "你想問\"現在\"還是未來\"一週\"的天氣?", "state2")