Skip to content

Commit

Permalink
fix(#60): prevent logger to send to discord if the bot is not up
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Artemus authored and barthofu committed Sep 11, 2022
1 parent 039108b commit fe10643
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/services/Logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ export class Logger {


async discordChannel(channelId: string, message: string | MessageOptions = '', level?: typeof this.levels[number]) {
if(!this.client.token) return

const channel = await this.client.channels.fetch(channelId)

if (
Expand Down

0 comments on commit fe10643

Please sign in to comment.