xernerx 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -116,62 +116,59 @@ module.exports = new class Functions {
|
|
|
116
116
|
for (const commands of Object.values(interaction.client.commands)) {
|
|
117
117
|
let commandInfo = {};
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
const command = commands.get(cmd);
|
|
119
|
+
const command = commands.find(command => command?.data?.name === cmd.toLowerCase() || command?.name === cmd.toLowerCase() || command?.id == cmd.toLowerCase());
|
|
121
120
|
|
|
121
|
+
if (command) {
|
|
122
122
|
if (command?.data?.options?.length > 0) {
|
|
123
123
|
command?.data?.options?.map(option => {
|
|
124
124
|
if (!option?.type) {
|
|
125
125
|
if (option?.options?.length > 0) {
|
|
126
126
|
option?.options?.map(opt => {
|
|
127
127
|
if (!opt.type) {
|
|
128
|
-
commandInfo = {
|
|
128
|
+
cmds.push(commandInfo = {
|
|
129
129
|
name: command?.data?.name + " " + option?.name + " " + opt?.name,
|
|
130
130
|
description: opt.description,
|
|
131
131
|
category: command.category
|
|
132
|
-
}
|
|
132
|
+
})
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
else {
|
|
136
|
-
commandInfo = {
|
|
136
|
+
cmds.push(commandInfo = {
|
|
137
137
|
name: command?.data?.name + " " + option?.name,
|
|
138
138
|
description: option?.description,
|
|
139
139
|
category: command.category
|
|
140
|
-
}
|
|
140
|
+
})
|
|
141
141
|
}
|
|
142
142
|
})
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
else {
|
|
146
|
-
commandInfo = {
|
|
146
|
+
cmds.push(commandInfo = {
|
|
147
147
|
name: command?.data?.name + " " + option?.name,
|
|
148
148
|
description: option?.description,
|
|
149
149
|
category: command.category
|
|
150
|
-
}
|
|
150
|
+
})
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
else {
|
|
155
|
-
commandInfo = {
|
|
155
|
+
cmds.push(commandInfo = {
|
|
156
156
|
name: command?.data?.name || command?.name || command?.id,
|
|
157
157
|
description: command?.data?.description || command?.description,
|
|
158
158
|
category: command.category
|
|
159
|
-
}
|
|
159
|
+
})
|
|
160
160
|
}
|
|
161
161
|
})
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
else {
|
|
165
|
-
commandInfo = {
|
|
165
|
+
cmds.push(commandInfo = {
|
|
166
166
|
name: command?.data?.name || command?.name || command?.id,
|
|
167
167
|
description: command?.data?.description || command?.description,
|
|
168
168
|
category: command.category
|
|
169
|
-
}
|
|
169
|
+
})
|
|
170
170
|
}
|
|
171
|
-
|
|
172
|
-
cmds.push(commandInfo);
|
|
173
171
|
}
|
|
174
|
-
|
|
175
172
|
}
|
|
176
173
|
return cmds;
|
|
177
174
|
}
|