File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,9 @@ export default class GeneralUtils {
132
132
const botinfoCache = this . client . cache . get ( 'botInfo' ) ;
133
133
if ( botinfoCache && useCache ) return botinfoCache ;
134
134
const cluster = this . client . cluster . id ;
135
- const shards = this . client . cluster . ids . map ( ( d ) => `#${ d . id } ` ) . join ( ', ' ) ;
135
+ const shards = Array . isArray ( this . client . cluster . ids )
136
+ ? this . client . cluster . ids . map ( ( id ) => `#${ id } ` ) . join ( ', ' )
137
+ : this . client . cluster . ids . map ( ( shard , id ) => `#${ id } ` ) . join ( ', ' ) ;
136
138
const guilds = this . client . guilds . cache . size ;
137
139
const members = this . client . guilds . cache . reduce ( ( acc , guild ) => acc + guild . memberCount , 0 ) ;
138
140
const memoryUsage = process . memoryUsage ( ) ;
@@ -508,7 +510,7 @@ export default class GeneralUtils {
508
510
} ) ;
509
511
510
512
const data = await response . json ( ) ;
511
- const url = Object . values ( data ) . find ( ( v ) => String ( v ) . isValidUrl ( ) ) ;
513
+ const url = data && typeof data === 'object' ? Object . values ( data ) . find ( ( v ) => String ( v ) . isValidUrl ( ) ) : null ;
512
514
513
515
return reply ( url ) ;
514
516
} catch ( e ) {
You can’t perform that action at this time.
0 commit comments