mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
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:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user