Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenyeargin committed Oct 3, 2022
1 parent 6db9f65 commit 50d4e6b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/nextbus.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
# Author:
# stephenyeargin

moment = require('moment')
AsciiTable = require('ascii-table')
baseURL = process.env.HUBOT_NEXTBUS_BASE_URL || 'https://gtfs.transitnownash.org'
latlon = process.env.HUBOT_NEXTBUS_LAT_LON
defaultStopId = process.env.HUBOT_NEXTBUS_STOP_ID

module.exports = (robot) ->
moment = require('moment')
AsciiTable = require('ascii-table')
baseURL = process.env.HUBOT_NEXTBUS_BASE_URL || 'https://gtfs.transitnownash.org'
latlon = process.env.HUBOT_NEXTBUS_LAT_LON
defaultStopId = process.env.HUBOT_NEXTBUS_STOP_ID

# query the default stop ID or location's closest bus stop
robot.respond /(?:bus|nextbus)(?: me)?$/i, (msg) ->
if defaultStopId
queryStopById stop_id, msg
queryStopById defaultStopId, msg
return

getAPIResponse "stops/near/#{latlon}/1000.json?per_page=5", msg, (stops) ->
Expand Down

0 comments on commit 50d4e6b

Please sign in to comment.