File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -419,13 +419,23 @@ export class HelpChanModule extends Module {
419
419
420
420
private async checkDormantPossibilities ( ) {
421
421
for ( const channel of this . getOngoingChannels ( ) ) {
422
- const messages = await channel . messages . fetch ( ) ;
422
+ const [ messages , member ] = await Promise . all ( [
423
+ channel . messages . fetch ( ) ,
424
+ this . getChannelMember ( channel ) ,
425
+ ] ) ;
423
426
424
427
const diff =
425
428
Date . now ( ) - ( messages . first ( ) ?. createdAt . getTime ( ) ?? 0 ) ;
426
429
427
- if ( diff > dormantChannelTimeout )
430
+ if ( ! member ) {
431
+ await channel . send (
432
+ 'Asker has left the server, closing channel...' ,
433
+ ) ;
434
+ }
435
+ if ( ! member || diff > dormantChannelTimeout ) {
428
436
await this . markChannelAsDormant ( channel ) ;
437
+ continue ;
438
+ }
429
439
}
430
440
}
431
441
You can’t perform that action at this time.
0 commit comments