Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
lluisd committed Mar 11, 2024
1 parent f917dc5 commit c372f7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handlers/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Stream {

async catchStream (telegramBot, twitchBot, target) {
const result = await TwitchService.getStream()
console.log('result 1min ' + result.type)
console.log(`result 1min type: ${result.type}, messagId: ${result.messageId}, lastTitle: ${result.lastTitle}, title: ${result.title}, last update:${result.lastUpdate}, diff: ${moment().diff(moment(result.lastUpdate))}, isdiff: ${(result.lastUpdate && moment().diff(moment(result.lastUpdate)) > 300000)}` )

if (result && result.type === 'live' ) {
await this.sendTodayBirthday(twitchBot, target)
Expand All @@ -48,7 +48,7 @@ class Stream {
await telegramBot.deleteMessage(config.telegram.chatId, result.messageId)
await this._sendStreamScreenshots(telegramBot, result.streamId)
await BrowserService.closeBrowser().catch(() => { console.error('closeBrowser on finished')})
} else if (result && result.type === 'stillLive' && result.messageId && (result.lastTitle !== result.title || (result.lastUpdate && moment().diff(moment(result.lastUpdate)) > 61000))) {
} else if (result && result.type === 'stillLive' && result.messageId && (result.lastTitle !== result.title || (result.lastUpdate && moment().diff(moment(result.lastUpdate)) > 300000))) {
const options = {
chat_id: config.telegram.chatId,
message_id: result.messageId,
Expand Down

0 comments on commit c372f7b

Please sign in to comment.