fix(InteractionResponses): use optional chaining on nullable property (#7812)

* fix(InteractionResponses): use optional chaining on nullable property

* fix: one more spot
This commit is contained in:
Ryan Munro
2022-04-19 23:56:45 +10:00
committed by GitHub
parent a6d9ce57c6
commit c5fb548529
2 changed files with 3 additions and 3 deletions

View File

@@ -211,7 +211,7 @@ class InteractionCollector extends Collector {
this.stop('messageDelete');
}
if (message.interaction.id === this.messageInteractionId) {
if (message.interaction?.id === this.messageInteractionId) {
this.stop('messageDelete');
}
}

View File

@@ -197,7 +197,7 @@ class InteractionResponses {
});
this.deferred = true;
return options.fetchReply ? this.fetchReply() : new InteractionResponse(this, this.message.interaction.id);
return options.fetchReply ? this.fetchReply() : new InteractionResponse(this, this.message.interaction?.id);
}
/**
@@ -232,7 +232,7 @@ class InteractionResponses {
});
this.replied = true;
return options.fetchReply ? this.fetchReply() : new InteractionResponse(this, this.message.interaction.id);
return options.fetchReply ? this.fetchReply() : new InteractionResponse(this, this.message.interaction?.id);
}
/**