s/tflstop/tflsearch/

This commit is contained in:
Evelyn 2016-07-10 23:44:37 +01:00
parent 36e12dda1f
commit 80bf0bb978

View file

@ -22,8 +22,8 @@ class Module(object):
).hook(self.line, ).hook(self.line,
help="Get line status for TfL underground lines", help="Get line status for TfL underground lines",
usage="<line_name>") usage="<line_name>")
bot.events.on("received").on("command").on("tflstop" bot.events.on("received").on("command").on("tflsearch"
).hook(self.stop, min_args=1, ).hook(self.search, min_args=1,
help="Get a list of TfL stop IDs for a given name", help="Get a list of TfL stop IDs for a given name",
usage="<name>") usage="<name>")
@ -126,7 +126,7 @@ class Module(object):
else: else:
event["stderr"].write("No results") event["stderr"].write("No results")
def stop(self, event): def search(self, event):
app_id = self.bot.config["tfl-api-id"] app_id = self.bot.config["tfl-api-id"]
app_key = self.bot.config["tfl-api-key"] app_key = self.bot.config["tfl-api-key"]
stop_name = event["args"] stop_name = event["args"]