diff --git a/src/commands/context-menu/blacklist.ts b/src/commands/context-menu/blacklist.ts index 36206f05..17ed2ed0 100644 --- a/src/commands/context-menu/blacklist.ts +++ b/src/commands/context-menu/blacklist.ts @@ -74,7 +74,7 @@ export default class Blacklist extends BaseCommand { .addArgs('u=1') .toString(), ) - .setLabel(t({ phrase: 'blacklist.components.user', locale })) + .setLabel(t({ phrase: 'blacklist.button.user', locale })) .setStyle(ButtonStyle.Secondary) .setEmoji('👤'), new ButtonBuilder() @@ -86,7 +86,7 @@ export default class Blacklist extends BaseCommand { .addArgs('s=1') .toString(), ) - .setLabel(t({ phrase: 'blacklist.components.user', locale })) + .setLabel(t({ phrase: 'blacklist.button.user', locale })) .setStyle(ButtonStyle.Secondary) .setEmoji('🏠'), ); diff --git a/src/managers/CommandManager.ts b/src/managers/CommandManager.ts index b4757681..83c18f29 100644 --- a/src/managers/CommandManager.ts +++ b/src/managers/CommandManager.ts @@ -146,12 +146,11 @@ export default class CommandManager extends Factory { await this.loadCommandFiles(filePath); } - // If the item is a .js file, read its contents else if (file.endsWith('.js') && file !== 'BaseCommand.js') { const imported = await import(importPrefix + filePath); const command = new imported.default(); - // if the command extends BaseCommand (ie. its not a subcommand), add it to the commands map + // if the command extends BaseCommand (ie. is not a subcommand), add it to the commands map if (Object.getPrototypeOf(command.constructor) === BaseCommand) { commandsMap.set(command.data.name, command); } @@ -164,7 +163,9 @@ export default class CommandManager extends Factory { access(subcommandFile, constants.F_OK, async (err) => { if (err || file === 'index.js') return; + // get the parent command class from the subcommand const parentCommand = Object.getPrototypeOf(command.constructor); + // set the subcommand class to the parent command's subcommands map parentCommand.subcommands.set(file.replace('.js', ''), command); }); } diff --git a/src/utils/Constants.ts b/src/utils/Constants.ts index 5dd62aeb..f754599e 100644 --- a/src/utils/Constants.ts +++ b/src/utils/Constants.ts @@ -92,8 +92,8 @@ export const colors = { 'NotQuiteBlack', 'Random', ] as (keyof typeof Colors)[], - interchatBlue: '#5CB5F9' as HexColorString, - invisible: '#2F3136' as HexColorString, + interchatBlue: '#58b9ff' as HexColorString, + invisible: '#2b2d31' as HexColorString, christmas: ['#00B32C', '#D6001C', '#FFFFFF'] as HexColorString[], } as const;