Skip to content

Commit

Permalink
fix: fix interaction reply checking
Browse files Browse the repository at this point in the history
  • Loading branch information
paradoxuum committed Dec 2, 2023
1 parent 16f8889 commit 0e8b475
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/shared/core/interaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ export class CommandInteraction {
}

replyFromData(data: CommandInteractionData) {
if (data.reply === undefined) return;

assert(
this.replyData === undefined,
"This CommandInteraction has already received a reply",
Expand All @@ -48,7 +46,7 @@ export class CommandInteraction {
}

isReplyReceived() {
return this.reply !== undefined;
return this.replyData !== undefined;
}

getReply() {
Expand All @@ -57,7 +55,7 @@ export class CommandInteraction {

private setReply(text: string, success: boolean) {
assert(
this.reply === undefined,
this.replyData === undefined,
"This CommandInteraction has already received a reply",
);
this.replyData = {
Expand Down

0 comments on commit 0e8b475

Please sign in to comment.