Skip to content

Commit

Permalink
fix(tmi): force bot reconnect after stream start
Browse files Browse the repository at this point in the history
  • Loading branch information
sogehige committed Apr 1, 2021
1 parent 29d5c98 commit 4b9e540
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bot/tmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { User, UserBitInterface } from './database/entity/user';
import { settings, ui } from './decorators';
import { command, default_permission } from './decorators';
import {
getFunctionList, onChange, onLoad,
getFunctionList, onChange, onLoad, onStreamStart,
} from './decorators/on';
import Expects from './expects';
import { isStreamOnline, stats } from './helpers/api';
Expand Down Expand Up @@ -232,6 +232,7 @@ class TMI extends Core {
/* will connect/reconnect bot and broadcaster
* this is called from oauth when channel is changed or initialized
*/
@onStreamStart()
async reconnect (type: 'bot' | 'broadcaster') {
try {
if (!this.shouldConnect) {
Expand Down

0 comments on commit 4b9e540

Please sign in to comment.