diff --git a/tcl.py b/tcl.py index c4165d5..2e85279 100644 --- a/tcl.py +++ b/tcl.py @@ -67,20 +67,23 @@ class Config(BaseProxyConfig): class Tcl(Plugin): async def start(self) -> None: self.config.load_and_update() + + def help_msg(self): + return( + """ + !tcl alerte ligne -> Retourne les alertes TCL sur la ligne donnée + !tcl horaires arrêt -> Retourne les horaires à l'arrêt + """ + ) - - @command.new(name="tcl", help="") + @command.new(name="tcl", help="Permet d'avoir des informations sur les TCL") @command.argument("pattern", pass_raw=True, required=True) async def tclInfos(self, evt: MessageEvent, pattern: str) -> None: await evt.mark_read() strToEncode = self.config["mail"] + ':' + self.config["password"] base64string = base64.b64encode(strToEncode.encode('utf-8')) if not pattern: - await evt.respond( - """ - !tcl alerte ligne -> Retourne les alertes TCL sur la ligne donnée - """ - ) + await evt.respond(self.help_msg()) else: self.log.info("Commande : " + pattern) if pattern.__contains__("alerte"): @@ -144,7 +147,6 @@ class Tcl(Plugin): url = 'https://download.data.grandlyon.com/ws/rdata/tcl_sytral.tclpassagearret/all.json?maxfeatures=2000&start=1' - #respText = "