From af67cb5e4fc112ec4080882467fbbede7fc0d7c1 Mon Sep 17 00:00:00 2001 From: Julian Rabe Date: Tue, 16 Jun 2020 14:55:05 +0200 Subject: [PATCH] fix: Logfile reference error Sentry TWITCH2MA-N --- src/lib/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/index.ts b/src/lib/index.ts index 86ea301..5c47025 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -132,7 +132,7 @@ function emitSocketEvent(event: string) { } function openCommandSocket() { - commandSocket.onError(exitWithError); + commandSocket.onError(error => exitWithError(error)); commandSocket.onExitCommand(() => { logger.socketMessage("Exit command received!"); exit(0); @@ -174,8 +174,8 @@ export async function attachEventHandlers(twitch2Ma: Twitch2Ma): Promise logger.channelMessage(channel, chalk`✋ User {bold ${user}} tried to run {bold.blue ${command}} but permissions were denied by ${reason}.`)) - twitch2Ma.onNotice(logger.notice); - twitch2Ma.onError(exitWithError); + twitch2Ma.onNotice(message => logger.notice(message)); + twitch2Ma.onError(error => exitWithError(error)); return twitch2Ma; }