diff --git a/src/commands/help.ts b/src/commands/help.ts index c200e18..1cb1ae2 100644 --- a/src/commands/help.ts +++ b/src/commands/help.ts @@ -96,11 +96,11 @@ const callback = async (interaction: CommandInteraction): Promise => { descriptionLocalized?: string; })[] = []; //options - if(subcommandRow.components[0]!.options.find(option => option.data.default)) { + if(currentPath[1] !== "" && currentPath[1] !== "none" && currentPath[2] !== "" && currentPath[2] !== "none") { let Op = current.options.find(option => option.name === currentPath[1])! as ApplicationCommandSubGroup let Op2 = Op.options!.find(option => option.name === currentPath[2])! options = Op2.options || [] - } else if(subcommandGroupRow.components[0]!.options.find(option => option.data.default)) { + } else if(currentPath[1] !== "" && currentPath[1] !== "none") { let Op = current.options.find(option => option.name === currentPath[1])! if(Op.type === ApplicationCommandOptionType.SubcommandGroup) { options = [] @@ -112,7 +112,7 @@ const callback = async (interaction: CommandInteraction): Promise => { options = current.options.filter(option => option.type !== ApplicationCommandOptionType.SubcommandGroup && option.type !== ApplicationCommandOptionType.Subcommand) || []; } for(const option of options) { - optionString += `> ${option.name} (${option.type})- ${option.description}\n` + optionString += `> ${option.name} (${ApplicationCommandOptionType[option.type]})- ${option.description}\n` } const APICommand = client.commands["commands/" + currentPath.filter(value => value !== "" && value !== "none").join("/")]![0] let allowedToRun = true; diff --git a/src/utils/commandRegistration/register.ts b/src/utils/commandRegistration/register.ts index e146069..50c8e78 100644 --- a/src/utils/commandRegistration/register.ts +++ b/src/utils/commandRegistration/register.ts @@ -171,7 +171,7 @@ async function registerCommandHandler() { const fullCommandName = "commands/" + commandName + (subcommandGroupName ? `/${subcommandGroupName}` : "") + (subcommandName ? `/${subcommandName}` : ""); - console.log(fullCommandName, client.commands[fullCommandName]) + // console.log(fullCommandName, client.commands[fullCommandName]) const command = client.commands[fullCommandName]![0]; const callback = command?.callback; const check = command?.check; @@ -223,5 +223,5 @@ export default async function register() { console.log( (config.enableDevelopment ? `${colours.purple}Bot started in Development mode` : `${colours.blue}Bot started in Production mode`) + colours.none) - console.log(client.commands) + // console.log(client.commands) }; diff --git a/src/utils/commandRegistration/slashCommandBuilder.ts b/src/utils/commandRegistration/slashCommandBuilder.ts index 72f92a2..b215572 100644 --- a/src/utils/commandRegistration/slashCommandBuilder.ts +++ b/src/utils/commandRegistration/slashCommandBuilder.ts @@ -55,7 +55,7 @@ export async function command( commandString = "commands/" + (commandString ?? path); const fetched = await getSubcommandsInFolder(config.commandsFolder + "/" + path); console.log(`│ ├─ ${fetched.errors ? colours.red : colours.green}Loaded ${fetched.subcommands.length} subcommands and ${fetched.subcommandGroups.length} subcommand groups for ${name} (${fetched.errors} failed)${colours.none}`) - console.log({name: name, description: description}) + // console.log({name: name, description: description}) client.commands[commandString!] = [undefined, { name: name, description: description }] return (command: SlashCommandBuilder) => { command.setName(name) diff --git a/src/utils/getCommandDataByName.ts b/src/utils/getCommandDataByName.ts index 2d4deb7..da3e54b 100644 --- a/src/utils/getCommandDataByName.ts +++ b/src/utils/getCommandDataByName.ts @@ -18,7 +18,7 @@ export const getCommandByName = (name: string): {name: string, description: stri const split = name.replaceAll(" ", "/") const command = client.commands["commands/" + split]!; - console.log(command) + // console.log(command) const mention = getCommandMentionByName(name); return { name: command[1].name,