diff --git a/src/bot.ts b/src/bot.ts index 15c3aa4..9ade9e4 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -95,7 +95,7 @@ client 'tasks', ); - return subscribeTwitchEvents(client).catch(console.error); + return subscribeTwitchEvents(client).catch(client.logger.error); }) // eslint-disable-next-line no-console .catch(console.error); diff --git a/src/utils/twitch-events.ts b/src/utils/twitch-events.ts index accd597..1cc629e 100644 --- a/src/utils/twitch-events.ts +++ b/src/utils/twitch-events.ts @@ -33,7 +33,7 @@ export const twitchEventSubListener = new EventSubListener({ export const subscribeTwitchEvents = async (client: SapphireClient) => { await twitchEventSubListener.listen().catch(console.error); - const subscriptions = await Promise.all( + await Promise.all( TWITCH_USER_IDS.map(async (userId) => twitchEventSubListener.subscribeToStreamOnlineEvents( userId, @@ -43,12 +43,6 @@ export const subscribeTwitchEvents = async (client: SapphireClient) => { ), ), ); - - await Promise.all( - subscriptions.map(async (sub, i) => - client.logger.info(`[${i}] => ${await sub.getCliTestCommand()}`), - ), - ); }; declare module 'discord.js' {