NR: Give 'arrivals' command more appropriate name, help now mentions buses

This commit is contained in:
Evelyn 2017-03-09 13:33:24 +00:00
parent ad8bde0232
commit a69ac85414

View file

@ -21,8 +21,8 @@ class Module(object):
self.bot = bot self.bot = bot
self._client = None self._client = None
bot.events.on("received").on("command").on("nrtrains" bot.events.on("received").on("command").on("nrtrains"
).hook(self.arrivals, min_args=1, ).hook(self.trains, min_args=1,
help="Get train information for a station (Powered by NRE)", help="Get train/bus services for a station (Powered by NRE)",
usage="<crs_id>") usage="<crs_id>")
bot.events.on("received").on("command").on("nrservice" bot.events.on("received").on("command").on("nrservice"
).hook(self.service, min_args=1, ).hook(self.service, min_args=1,
@ -79,7 +79,7 @@ class Module(object):
ret["errors_summary"] = ", ".join(['"%s": %s' % (a[0], a[1]) for a in ret["errors"]]) ret["errors_summary"] = ", ".join(['"%s": %s' % (a[0], a[1]) for a in ret["errors"]])
return ret return ret
def arrivals(self, event): def trains(self, event):
client = self.client client = self.client
colours = [Utils.COLOR_LIGHTBLUE, Utils.COLOR_GREEN, Utils.COLOR_RED, Utils.COLOR_CYAN, Utils.COLOR_LIGHTGREY] colours = [Utils.COLOR_LIGHTBLUE, Utils.COLOR_GREEN, Utils.COLOR_RED, Utils.COLOR_CYAN, Utils.COLOR_LIGHTGREY]