Skip to content

Commit

Permalink
chore: project lead is allergic to changes...
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Jan 12, 2022
1 parent f6d4f4b commit 465db1f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class CoreListener extends Listener<typeof Events.ChatInputCommandAccepte
return { result, duration };
});

const { duration } = result.value!;
const { duration } = result.value ?? { duration: -1 };

if (isErr(result)) {
this.container.client.emit(Events.ChatInputCommandError, result.error, { ...payload, duration });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class CoreListener extends Listener<typeof Events.ContextMenuCommandAccep
return { result, duration };
});

const { duration } = result.value!;
const { duration } = result.value ?? { duration: -1 };

if (isErr(result)) {
this.container.client.emit(Events.ContextMenuCommandError, result.error, { ...payload, duration });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class CoreListener extends Listener<typeof Events.MessageCommandAccepted>
return { result, duration };
});

const { duration } = result.value!;
const { duration } = result.value ?? { duration: -1 };

if (isErr(result)) {
message.client.emit(Events.MessageCommandError, result.error, { ...payload, args, duration });
Expand Down

0 comments on commit 465db1f

Please sign in to comment.