{"action":"created","issue":{"url":"https://api.github.com/repos/izy521/discord.io/issues/73","repository_url":"https://api.github.com/repos/izy521/discord.io","labels_url":"https://api.github.com/repos/izy521/discord.io/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/izy521/discord.io/issues/73/comments","events_url":"https://api.github.com/repos/izy521/discord.io/issues/73/events","html_url":"https://github.com/izy521/discord.io/issues/73","id":159447893,"number":73,"title":"Bot is Timing Out (keepalive)","user":{"login":"Zamiell","id":5511220,"avatar_url":"https://avatars.githubusercontent.com/u/5511220?v=3","gravatar_id":"","url":"https://api.github.com/users/Zamiell","html_url":"https://github.com/Zamiell","followers_url":"https://api.github.com/users/Zamiell/followers","following_url":"https://api.github.com/users/Zamiell/following{/other_user}","gists_url":"https://api.github.com/users/Zamiell/gists{/gist_id}","starred_url":"https://api.github.com/users/Zamiell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zamiell/subscriptions","organizations_url":"https://api.github.com/users/Zamiell/orgs","repos_url":"https://api.github.com/users/Zamiell/repos","events_url":"https://api.github.com/users/Zamiell/events{/privacy}","received_events_url":"https://api.github.com/users/Zamiell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-09T16:10:42Z","updated_at":"2016-06-09T16:43:08Z","closed_at":null,"body":"Hello,\r\n\r\nI just started recently using the discord.io framework, which is pretty great, so thanks for writing it!\r\n\r\nOne problem that I've immediately noticed is that, after 24+ hours, my bot will stop receiving messages from the Discord server. The only fix is that I completely restart the bot, which reconnects to the server, and all is well.\r\n\r\nNot 100% sure why this is, but I suspect that it the keep-alive function (at line 1013?) is not robust enough. Has anyone else experienced this problem? Furthermore, can the bot be configured to automatically reconnect if this occurs?\r\n\r\ntags: keep-alive, keepalive, heartbeat, phantom disconnect"},"comment":{"url":"https://api.github.com/repos/izy521/discord.io/issues/comments/224954480","html_url":"https://github.com/izy521/discord.io/issues/73#issuecomment-224954480","issue_url":"https://api.github.com/repos/izy521/discord.io/issues/73","id":224954480,"user":{"login":"Zamiell","id":5511220,"avatar_url":"https://avatars.githubusercontent.com/u/5511220?v=3","gravatar_id":"","url":"https://api.github.com/users/Zamiell","html_url":"https://github.com/Zamiell","followers_url":"https://api.github.com/users/Zamiell/followers","following_url":"https://api.github.com/users/Zamiell/following{/other_user}","gists_url":"https://api.github.com/users/Zamiell/gists{/gist_id}","starred_url":"https://api.github.com/users/Zamiell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zamiell/subscriptions","organizations_url":"https://api.github.com/users/Zamiell/orgs","repos_url":"https://api.github.com/users/Zamiell/repos","events_url":"https://api.github.com/users/Zamiell/events{/privacy}","received_events_url":"https://api.github.com/users/Zamiell/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T16:43:07Z","updated_at":"2016-06-09T16:43:07Z","body":"Ah, okay. Thanks izy. I wasn't using the disconnect event. Is it as simple as adding the following to my bot?\r\n\r\n```\r\nbot.on('disconnect', function(erMsg, code) {  // Automatically reconnect if the bot disconnects due to inactivity\r\n    console.log('----- Bot disconnected from Discord with code', code, 'for reason:', erMsg, '-----');\r\n    bot.connect()\r\n});\r\n```\r\n\r\n"}}
{"actor":{"display_login":"Zamiell"}}