Skip to content

Commit

Permalink
feat(Component): add options option
Browse files Browse the repository at this point in the history
  • Loading branch information
SebestikCZ authored May 1, 2022
1 parent 188cc77 commit 937efee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/structures/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export class Component {
public client: GClient;
public name: string;
public type: Array<ComponentType | keyof typeof ComponentType>;
public options: ComponentOptions;
public inhibitors: ComponentInhibitors = [];
public guildId?: string;
private static defaults: Partial<ComponentOptions>;
Expand Down Expand Up @@ -90,6 +91,7 @@ export class Component {
this.run = options.run || Component.defaults?.run;
this.onError = options.onError || Component.defaults?.onError;
this.autoDefer = options.autoDefer || Component.defaults?.autoDefer;
this.options = this;

Components.register(this);
})
Expand Down

0 comments on commit 937efee

Please sign in to comment.