fix(ReactionCollector): check for channel.threads (#7069)

This commit is contained in:
Antonio Román
2021-12-07 11:19:36 +01:00
committed by GitHub
parent b6b4570482
commit 3846f0d97c

View File

@@ -187,7 +187,7 @@ class ReactionCollector extends Collector {
* @returns {void}
*/
_handleChannelDeletion(channel) {
if (channel.id === this.message.channelId || channel.id === this.message.channel.parentId) {
if (channel.id === this.message.channelId || channel.threads?.cache.has(this.message.channelId)) {
this.stop('channelDelete');
}
}