Ejemplo n.º 1
0
	def __init__(self, auth_key):		
		self.chats = dict()
		self.users = dict()

		self.chat_user_actions = dict()

		self.bot = Updater(auth_key)
		self.manualbot = Bot(token=auth_key)
		
		# Initialize google distance class
		self.googleDist = travelBotdistance.travelBotdistance()
		self.googleDist.setUp()

		# Get the dispatcher to register handlers
		dp = self.bot.dispatcher

		# Register commands
		dp.addTelegramCommandHandler("start", self.start)
		#dp.addTelegramCommandHandler("search", self.search)
		dp.addTelegramCommandHandler("help", self.help)
		dp.addTelegramMessageHandler(self.echo)
		dp.addErrorHandler(self.error)

		dest = travelBotdestinations.travelBotdestinations()
		#self.travelDestinations = dest.load_destinations('./csv/destinations2.csv')
		self.botnltk = travelBotnltk.travelBotnltk()
Ejemplo n.º 2
0
	def __init__(self, start_position ):


		# Load Destination Activities
		self.da_obj = da.travelBotdestinations()
		self.dest_activities = self.da_obj.load_destinations("./csv/DestinationActivityFreqRank.csv")


		# Load Destination Weather
		# 0 = Fri Day Temp, 12 = Sat Day Temp, 24 = Sun Day Temp
		self.dd_obj = dd.travelBotdistance()
		self.dd_obj.setUp()
		self.dest_list = self.dd_obj.getDestination()
		self.dest_weather = self.dd_obj.getWeather(self.dest_list)

		# Load Destination Travel
		self.dest_time = self.dd_obj.timeDist(start_position, self.dest_list)

		# Load Destination Hotels
		dh_obj = dh.travelBothotels()
		self.dest_hotels = dh_obj.load_hotels('./csv/hotel_info.csv')