Skip to content

Commit 5f7b213

Browse files
authored
Merge pull request #178 from Garlic-Team/dev
7.0.2
2 parents dbabbd5 + 78575bb commit 5f7b213

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gcommands",
3-
"version": "7.0.1",
3+
"version": "7.0.2",
44
"description": "Powerful and flexible command handler that can do everything!",
55
"main": "src/index.js",
66
"types": "./typings/index.d.ts",

src/managers/GCommandLoader.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)