示例#1
0
 def __init__(self, booking: Booking):
     classrooms_source = booking.get_classroom_source()
     self._buildings_dict = {}  # type: Dict
     keys = []
     for building in classrooms_source.get_all_buildings():
         building_command = building.get_name().lower().replace(" ", "_")
         keys.append(building_command)
         self._buildings_dict[building_command] = building.get_identifier()
     super().__init__(booking, keys, False, exact_match=True)
示例#2
0
 def __init__(self, booking: Booking):
     classrooms_source = booking.get_classroom_source()
     self._classrooms_dict = {}  # type: Dict
     keys = []
     for classroom in classrooms_source.get_all_classrooms():
         classroom_command = classroom.get_name().lower().replace(" ", "_")
         keys.append(classroom_command)
         self._classrooms_dict[classroom_command] = classroom.get_identifier()
     super().__init__(booking, keys, case_sensitive=False, exact_match=True)
示例#3
0
 def __init__(self, booking: Booking):
     classrooms_source = booking.get_classroom_source()
     keys = []
     self._keyboard = None
     for building in classrooms_source.get_all_buildings():
         building_command = "/" + building.get_name().lower().replace(" ", "_")
         keys.append([KeyboardButton(building_command)])
     if len(keys) > 0:
         self._keyboard = ReplyKeyboardMarkup(keys)
     super().__init__(booking, ["buildings"], False, exact_match=True)