From 103840d9fb9d486b054770d6f23aba4392698848 Mon Sep 17 00:00:00 2001 From: Kevin LEIBA Date: Wed, 14 Apr 2021 12:23:42 +0200 Subject: [PATCH] fixed function call name --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 839d9d1..2ca18e1 100644 --- a/index.js +++ b/index.js @@ -6,14 +6,14 @@ const schedule = require("node-schedule"); const controller = Botkit.slackbot(config.controller); const bot = controller.spawn({ - token: config.token + token: config.token, }); const startRTM = () => { bot.startRTM((err, _bot, _payload) => { if (err) { console.log(err); - return setTimeout(start_rtm, 60000); + return setTimeout(startRTM, 60000); } else { console.log("Ready to taco !"); taco.init(); @@ -22,8 +22,8 @@ const startRTM = () => { }); }; -controller.on("rtm_close", function(_bot, _err) { - start_rtm(); +controller.on("rtm_close", function (_bot, _err) { + startRTM(); }); startRTM();