File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -356,15 +356,15 @@ export class HelpChanModule extends Module {
356
356
// to creation date), so sorting is needed to find the latest embed.
357
357
let lastMessage = channel . messages . cache
358
358
. array ( )
359
- . filter ( m => m . author . id === this . client . user ?. id )
359
+ . filter ( m => m . author && m . author . id === this . client . user ?. id )
360
360
. sort ( ( m1 , m2 ) => m2 . createdTimestamp - m1 . createdTimestamp )
361
361
. find ( m => m . embeds . some ( isStatusEmbed ) ) ;
362
362
363
363
if ( ! lastMessage )
364
364
// Fetch has a stable order, with recent messages first
365
365
lastMessage = ( await channel . messages . fetch ( { limit : 5 } ) )
366
366
. array ( )
367
- . filter ( m => m . author . id === this . client . user ?. id )
367
+ . filter ( m => m . author && m . author . id === this . client . user ?. id )
368
368
. find ( m => m . embeds . some ( isStatusEmbed ) ) ;
369
369
370
370
if ( lastMessage ) {
You can’t perform that action at this time.
0 commit comments