File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/discord.js/src/structures Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ class InteractionCollector extends Collector {
40
40
* The message from which to collect interactions, if provided
41
41
* @type {?Snowflake }
42
42
*/
43
- this . messageId = options . message ?. id ?? null ;
43
+ this . messageId = options . message ?. id ?? options . interactionResponse ?. interaction . message ?. id ?? null ;
44
44
45
45
/**
46
46
* The message interaction id from which to collect interactions, if provided
@@ -178,7 +178,13 @@ class InteractionCollector extends Collector {
178
178
if ( this . type && interaction . type !== this . type ) return null ;
179
179
if ( this . componentType && interaction . componentType !== this . componentType ) return null ;
180
180
if ( this . messageId && interaction . message ?. id !== this . messageId ) return null ;
181
- if ( this . messageInteractionId && interaction . message ?. interaction ?. id !== this . messageInteractionId ) return null ;
181
+ if (
182
+ this . messageInteractionId &&
183
+ interaction . message ?. interaction ?. id &&
184
+ interaction . message . interaction . id !== this . messageInteractionId
185
+ ) {
186
+ return null ;
187
+ }
182
188
if ( this . channelId && interaction . channelId !== this . channelId ) return null ;
183
189
if ( this . guildId && interaction . guildId !== this . guildId ) return null ;
184
190
You can’t perform that action at this time.
0 commit comments