Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
feat(Client): allow custom ErrorHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
ijsKoud committed Dec 5, 2022
1 parent 8686a84 commit 7fb5a41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class IgloClient extends Client {
public commandHandler: CommandHandler;
public eventHandler: EventHandler;
public interactionHandler: InteractionHandler;
public errorHandler = new ErrorHandler(this);
public errorHandler: ErrorHandler;

public logger: Logger;

Expand All @@ -22,6 +22,7 @@ export class IgloClient extends Client {
this.commandHandler = new CommandHandler(this, options.paths.commands);
this.eventHandler = new EventHandler(this, options.paths.events);
this.interactionHandler = new InteractionHandler(this, options.paths.interactions);
this.errorHandler = options.errorHandler ?? new ErrorHandler(this);
}

/**
Expand Down

0 comments on commit 7fb5a41

Please sign in to comment.