javascript client for hatbot