Skip to content

Commit

Permalink
remove not needed require
Browse files Browse the repository at this point in the history
  • Loading branch information
lluisd committed Feb 20, 2024
1 parent da7a374 commit 719e90a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion handlers/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Stream {
const text = this._getText(result)
const options = { parse_mode: 'Markdown' }
const msg = await telegramBot.sendMessage(config.telegram.chatId, text, options)
await telegramBot.pinChatMessage(config.telegram.chatId, msg.message_id).catch(() => {})
await telegramBot.pinChatMessage(config.telegram.chatId, msg.message_id).catch((err) => { console.error(`cannot pin chat: ${err}`)})
await TwitchService.saveLastMessage(msg)
await TwitchService.saveTitle(result.title)

Expand Down
7 changes: 3 additions & 4 deletions lib/messenger.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ const InputParser = require('./inputParser')
const inputParser = new InputParser()
const tmi = require('@twurple/auth-tmi')
const { RefreshingAuthProvider } = require('@twurple/auth')
const TokenService = require("../services/token");
const Notifier = require("./notifier");
const cron = require("node-cron");
const TokenService = require("../services/token")
const Notifier = require("./notifier")

class Messenger {
constructor () {}
Expand Down Expand Up @@ -103,7 +102,7 @@ class Messenger {
console.log(`* Unhosting ${channel} with ${viewers} viewers`);
}

async handleConnect (addr, port) {
handleConnect (addr, port) {
console.log(`* Connected to ${addr}:${port}`)
}
}
Expand Down

0 comments on commit 719e90a

Please sign in to comment.