Skip to content

Commit

Permalink
chore(console): remove console logs or use logger
Browse files Browse the repository at this point in the history
  • Loading branch information
Lutonite committed Jun 14, 2022
1 parent 0aa9913 commit e3dfd7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 1 addition & 7 deletions src/utils/twitch-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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' {
Expand Down

0 comments on commit e3dfd7f

Please sign in to comment.