This commit is contained in:
Mylloon 2023-01-17 20:07:05 +01:00
parent 406ba18241
commit 67d42e7d35
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -48,6 +48,7 @@ export default {
}[] = [];
// Load all the command per categories
// TODO: Check if the command exist in the context (guild)
client.commands.categories.forEach((commands_name, category) => {
const commands = commands_name.reduce((data, command_name) => {
return data + `\`/${command_name}\`, `;
@ -70,6 +71,7 @@ export default {
}
// If a command is specified
// TODO: Check if the command exist in the context (guild)
const command = client.commands.list.get(desired_command);
if (!command) {
// Command don't exist