Skip to content

Commit

Permalink
fix(main): ignore parse error from twitchjs (#3774)
Browse files Browse the repository at this point in the history
Fixes #3762
  • Loading branch information
sogehige committed May 19, 2020
1 parent dc8a9e9 commit b0a4171
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bot/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ process.on('uncaughtException', (err) => {
const date = new Date().toISOString();
process.report?.writeReport(`uncaughtException-${date}`, err);
error(util.inspect(err));
if (err.message.includes('[TwitchJS] Parse error encountered [Chat]')) {
// workaround for https://github.com/sogehige/sogeBot/issues/3762
return;
}
error('');
error('BOT HAS UNEXPECTEDLY CRASHED');
error('PLEASE CHECK https://github.com/sogehige/SogeBot/wiki/How-to-report-an-issue');
Expand Down

0 comments on commit b0a4171

Please sign in to comment.