使用botkit中间件的松弛bot服务器每天几乎在同一时间和同一时间丢失rtm api连接。是这个规范吗?
Tue, 23 Oct 2018 04:41:12 GMT ** The RTM api just closed
Mon, 22 Oct 2018 04:41:12 GMT ** The RTM api just closed
Sun, 21 Oct 2018 04:18:12 GMT ** The RTM api just closed
Sat, 20 Oct 2018 04:34:02 GMT ** The RTM api just closed
Botkit.webserver = express();
Botkit.webserver.use(bodyParser.json());
Botkit.webserver.use(bodyParser.urlencoded({ extended: true }));
Botkit.webserver.use(express.static(path.join(__dirname, 'public')));
http.createServer(Botkit.webserver);
const controller = Botkit.slackbot({
debug: false,
hostname: '0.0.0.0',
json_file_store: './bot_db/'
}).configureSlackApp(
{
clientId: process.env.clientId,
clientSecret: process.env.clientSecret,
scopes: ['bot']
}
);
// you may want to attempt to re-open
controller.on('rtm_close', (bot) => {
const now = new Date;
console.error(`${now.toGMTString()} ** The RTM api just closed`);
});
谢谢