You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
I have created a bot which works fine for only some hours, but, with no reason, after several hours the bot status is go away and I cannot interact with it. The bot is still running in the server, it didn't crash and I don't see any error log?
The text was updated successfully, but these errors were encountered:
Below might help you keep track of rtm disconnects and reconnect failurs which can cause the bot to stop responding.
console.log('\n\n*** '+moment().tz('America/Los_Angeles').format()+' ** The RTM api just closed');
try {
controller.findTeamById('<SLACK_TEAM_ID_HERE>', function(err, team) {
var alertBot = controller.spawn(team);
alertBot.api.chat.postMessage(
{
channel : '<SLACK_CHANNEL_ID_HERE>',
text: 'GUYS!!! I just got an RTM Close event trigger for this team --> '+bot.team_info.id+' '+bot.team_info.name+' .',
attachments: [],
}, function (err, response) {
});
});
} catch (err) {
console.log('\n\n*** '+moment().tz('America/Los_Angeles').format()+' Tried to send alert for an rtm_close event but failed with this error: '+err);
}
});
controller.on('rtm_reconnect_failed',function(bot) {
console.log('\n\n*** '+moment().tz('America/Los_Angeles').format()+' ** Unable to automatically reconnect to rtm after a closed conection.');
try {
controller.findTeamById('<SLACK_TEAM_ID_HERE>', function(err, team) {
var alertBot = controller.spawn(team);
alertBot.api.chat.postMessage(
{
channel : '<SLACK_CHANNEL_ID_HERE>',
text: 'GUYS!!! I just got an RTM Reconnect Failed trigger for this team --> '+bot.team_info.id+' name: '+bot.team_info.name+'. The team either uninstalled the app or there was an issue which requires a resart of the bot.',
attachments: [],
}, function (err, response) {
});
});
} catch (err) {
console.log('\n\n*** '+moment().tz('America/Los_Angeles').format()+' Tried to send alert for an rtm_reconnect_failed event but failed with this error: '+err);
}
});```
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have created a bot which works fine for only some hours, but, with no reason, after several hours the bot status is go away and I cannot interact with it. The bot is still running in the server, it didn't crash and I don't see any error log?
The text was updated successfully, but these errors were encountered: