@@ -123,7 +123,7 @@ class GCommandLoader {
123123 if ( guildOnly ) ifAlready = ( await __getAllCommands ( this . client , guildOnly ) ) . filter ( c => c . name === cmd . name && c . type === 1 ) ;
124124 else ifAlready = ( await this . _allGlobalCommands ) . filter ( c => c . name === cmd . name && c . type === 1 ) ;
125125
126- if ( ifAlready . length > 0 && ( ( ifAlready [ 0 ] . default_permission === false && ( ( Object . values ( cmd ) [ 9 ] || Object . values ( cmd ) [ 11 ] ) !== undefined ) ) || ( ifAlready [ 0 ] . default_permission === true && ( ( Object . values ( cmd ) [ 9 ] || Object . values ( cmd ) [ 11 ] ) === undefined ) ) ) && ifAlready [ 0 ] . description === cmd . description && JSON . stringify ( comparable ( cmd . args ) ) === JSON . stringify ( comparable ( ifAlready [ 0 ] . options ) ) ) { // eslint-disable-line max-len
126+ if ( ifAlready . length > 0 && ( ( ifAlready [ 0 ] . default_permission === false && ( ( Object . values ( cmd ) [ 10 ] || Object . values ( cmd ) [ 12 ] ) !== undefined ) ) || ( ifAlready [ 0 ] . default_permission === true && ( ( Object . values ( cmd ) [ 10 ] || Object . values ( cmd ) [ 12 ] ) === undefined ) ) ) && ifAlready [ 0 ] . description === cmd . description && JSON . stringify ( comparable ( cmd . args ) ) === JSON . stringify ( comparable ( ifAlready [ 0 ] . options ) ) ) { // eslint-disable-line max-len
127127 this . GCommandsClient . emit ( Events . LOG , new Color ( `&d[GCommands] &aLoaded from cache (Slash): &e➜ &3${ cmd . name } ` , { json : false } ) . getText ( ) ) ;
128128 return ;
129129 }
@@ -139,7 +139,7 @@ class GCommandLoader {
139139 description : cmd . description ,
140140 options : cmd . args || [ ] ,
141141 type : 1 ,
142- default_permission : ( Object . values ( cmd ) [ 9 ] || Object . values ( cmd ) [ 11 ] ) === undefined ,
142+ default_permission : ( Object . values ( cmd ) [ 10 ] || Object . values ( cmd ) [ 12 ] ) === undefined ,
143143 } ,
144144 url,
145145 } ;
@@ -297,7 +297,7 @@ class GCommandLoader {
297297 for ( const commandName in keys ) {
298298 const cmd = this . client . gcommands . get ( keys [ commandName ] ) ;
299299
300- if ( ( Object . values ( cmd ) [ 9 ] || Object . values ( cmd ) [ 11 ] ) === undefined ) continue ;
300+ if ( ( Object . values ( cmd ) [ 10 ] || Object . values ( cmd ) [ 12 ] ) === undefined ) continue ;
301301
302302 const loadCommandPermission = async apiCommands => {
303303 for ( const apiCommand of apiCommands ) {
0 commit comments