finished?
diff --git a/src/utils/commandRegistration/register.ts b/src/utils/commandRegistration/register.ts
index 6805019..0ff04b3 100644
--- a/src/utils/commandRegistration/register.ts
+++ b/src/utils/commandRegistration/register.ts
@@ -6,7 +6,7 @@
import EmojiEmbed from '../generateEmojiEmbed.js';
import getEmojiByName from '../getEmojiByName.js';
-const colours = {
+const colors = {
red: "\x1b[31m",
green: "\x1b[32m",
yellow: "\x1b[33m",
@@ -26,11 +26,11 @@
for (const file of files) {
const last = i === files.length - 1 ? "└" : "├";
if (file.isDirectory()) {
- console.log(`${last}─ ${colours.yellow}Loading subcommands of ${file.name}${colours.none}`)
+ console.log(`${last}─ ${colors.yellow}Loading subcommands of ${file.name}${colors.none}`)
const fetched = (await import(`../../../${config.commandsFolder}/${file.name}/_meta.js`));
commands.push(fetched.command);
} else if (file.name.endsWith(".js")) {
- console.log(`${last}─ ${colours.yellow}Loading command ${file.name}${colours.none}`)
+ console.log(`${last}─ ${colors.yellow}Loading command ${file.name}${colors.none}`)
const fetched = (await import(`../../../${config.commandsFolder}/${file.name}`));
fetched.command.setDMPermission(fetched.allowedInDMs ?? false)
fetched.command.setNameLocalizations(fetched.nameLocalizations ?? {})
@@ -43,9 +43,9 @@
];
}
i++;
- console.log(`${last.replace("└", " ").replace("├", "│")} └─ ${colours.green}Loaded ${file.name} [${i} / ${files.length}]${colours.none}`)
+ console.log(`${last.replace("└", " ").replace("├", "│")} └─ ${colors.green}Loaded ${file.name} [${i} / ${files.length}]${colors.none}`)
}
- console.log(`${colours.yellow}Loaded ${commands.length} commands, processing...`)
+ console.log(`${colors.yellow}Loaded ${commands.length} commands, processing...`)
const processed = []
for (const subcommand of commands) {
@@ -56,7 +56,7 @@
}
}
- console.log(`${colours.green}Processed ${processed.length} commands${colours.none}`)
+ console.log(`${colors.green}Processed ${processed.length} commands${colors.none}`)
return processed;
};
@@ -73,15 +73,15 @@
const last = i === files.length - 1 ? "└" : "├";
i++;
try {
- console.log(`${last}─ ${colours.yellow}Loading event ${file.name}${colours.none}`)
+ console.log(`${last}─ ${colors.yellow}Loading event ${file.name}${colors.none}`)
const event = (await import(`../../../${config.eventsFolder}/${file.name}`));
client.on(event.event, event.callback.bind(null, client));
- console.log(`${last.replace("└", " ").replace("├", "│")} └─ ${colours.green}Loaded ${file.name} [${i} / ${files.length}]${colours.none}`)
+ console.log(`${last.replace("└", " ").replace("├", "│")} └─ ${colors.green}Loaded ${file.name} [${i} / ${files.length}]${colors.none}`)
} catch (e) {
errors++;
- console.log(`${last.replace("└", " ").replace("├", "│")} └─ ${colours.red}Failed to load ${file.name} [${i} / ${files.length}]${colours.none}`)
+ console.log(`${last.replace("└", " ").replace("├", "│")} └─ ${colors.red}Failed to load ${file.name} [${i} / ${files.length}]${colors.none}`)
}
}
console.log(`Loaded ${files.length - errors} events (${errors} failed)`)
@@ -104,7 +104,7 @@
const last = i === totalFiles - 1 ? "└" : "├";
i++;
try {
- console.log(`${last}─ ${colours.yellow}Loading message context menu ${file.name}${colours.none}`)
+ console.log(`${last}─ ${colors.yellow}Loading message context menu ${file.name}${colors.none}`)
const context = (await import(`../../../${config.messageContextFolder}/${file.name}`));
context.command.setType(ApplicationCommandType.Message);
context.command.setDMPermission(context.allowedInDMs ?? false)
@@ -113,27 +113,27 @@
client.commands["contextCommands/message/" + context.command.name] = context;
- console.log(`${last.replace("└", " ").replace("├", "│")} └─ ${colours.green}Loaded ${file.name} [${i} / ${totalFiles}]${colours.none}`)
+ console.log(`${last.replace("└", " ").replace("├", "│")} └─ ${colors.green}Loaded ${file.name} [${i} / ${totalFiles}]${colors.none}`)
} catch (e) {
errors++;
- console.log(`${last.replace("└", " ").replace("├", "│")} └─ ${colours.red}Failed to load ${file.name} [${i} / ${totalFiles}] | ${e}${colours.none}`)
+ console.log(`${last.replace("└", " ").replace("├", "│")} └─ ${colors.red}Failed to load ${file.name} [${i} / ${totalFiles}] | ${e}${colors.none}`)
}
}
for (const file of userFiles) {
const last = i === totalFiles - 1 ? "└" : "├";
i++;
try {
- console.log(`${last}─ ${colours.yellow}Loading user context menu ${file.name}${colours.none}`)
+ console.log(`${last}─ ${colors.yellow}Loading user context menu ${file.name}${colors.none}`)
const context = (await import(`../../../${config.userContextFolder}/${file.name}`));
context.command.setType(ApplicationCommandType.User);
commands.push(context.command);
client.commands["contextCommands/user/" + context.command.name] = context;
- console.log(`${last.replace("└", " ").replace("├", "│")} └─ ${colours.green}Loaded ${file.name} [${i} / ${totalFiles}]${colours.none}`)
+ console.log(`${last.replace("└", " ").replace("├", "│")} └─ ${colors.green}Loaded ${file.name} [${i} / ${totalFiles}]${colors.none}`)
} catch (e) {
errors++;
- console.log(`${last.replace("└", " ").replace("├", "│")} └─ ${colours.red}Failed to load ${file.name} [${i} / ${totalFiles}]${colours.none}`)
+ console.log(`${last.replace("└", " ").replace("├", "│")} └─ ${colors.red}Failed to load ${file.name} [${i} / ${totalFiles}]${colors.none}`)
}
}
@@ -210,18 +210,18 @@
if (process.argv.includes("--update-commands")) {
if (config.enableDevelopment) {
const guild = await client.guilds.fetch(config.developmentGuildID);
- console.log(`${colours.purple}Registering commands in ${guild!.name}${colours.none}`)
+ console.log(`${colors.purple}Registering commands in ${guild!.name}${colors.none}`)
await guild.commands.set(commandList);
} else {
- console.log(`${colours.blue}Registering commands in production mode${colours.none}`)
+ console.log(`${colors.blue}Registering commands in production mode${colors.none}`)
await client.application?.commands.set(commandList);
}
}
await registerCommandHandler();
await registerEvents();
- console.log(`${colours.green}Registered commands, events and context menus${colours.none}`)
+ console.log(`${colors.green}Registered commands, events and context menus${colors.none}`)
console.log(
- (config.enableDevelopment ? `${colours.purple}Bot started in Development mode` :
- `${colours.blue}Bot started in Production mode`) + colours.none)
+ (config.enableDevelopment ? `${colors.purple}Bot started in Development mode` :
+ `${colors.blue}Bot started in Production mode`) + colors.none)
// console.log(client.commands)
};
diff --git a/src/utils/commandRegistration/slashCommandBuilder.ts b/src/utils/commandRegistration/slashCommandBuilder.ts
index ef45875..9a72605 100644
--- a/src/utils/commandRegistration/slashCommandBuilder.ts
+++ b/src/utils/commandRegistration/slashCommandBuilder.ts
@@ -6,7 +6,7 @@
import Discord from "discord.js";
-const colours = {
+const colors = {
red: "\x1b[31m",
green: "\x1b[32m",
none: "\x1b[0m"
@@ -23,7 +23,7 @@
// If the name of the command does not match the path (e.g. attachment.ts has /attachments), use commandString
console.log(`│ ├─ Loading group ${name}`)
const fetched = await getSubcommandsInFolder(config.commandsFolder + "/" + path, "│ ")
- console.log(`│ │ └─ ${fetched.errors ? colours.red : colours.green}Loaded ${fetched.subcommands.length} subcommands for ${name} (${fetched.errors} failed)${colours.none}`)
+ console.log(`│ │ └─ ${fetched.errors ? colors.red : colors.green}Loaded ${fetched.subcommands.length} subcommands for ${name} (${fetched.errors} failed)${colors.none}`)
return (subcommandGroup: SlashCommandSubcommandGroupBuilder) => {
subcommandGroup
.setName(name)
@@ -54,7 +54,7 @@
// If the name of the command does not match the path (e.g. attachment.ts has /attachments), use commandString
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(`│ ├─ ${fetched.errors ? colors.red : colors.green}Loaded ${fetched.subcommands.length} subcommands and ${fetched.subcommandGroups.length} subcommand groups for ${name} (${fetched.errors} failed)${colors.none}`)
// console.log({name: name, description: description})
client.commands[commandString!] = [undefined, { name: name, description: description }]
return (command: SlashCommandBuilder) => {
diff --git a/src/utils/createPageIndicator.ts b/src/utils/createPageIndicator.ts
index 29ea83b..6bc86a4 100644
--- a/src/utils/createPageIndicator.ts
+++ b/src/utils/createPageIndicator.ts
@@ -2,7 +2,7 @@
function pageIndicator(amount: number, selected: number, showDetails?: boolean, disabled?: boolean | string) {
let out = "";
- disabled = disabled ? "GREY." : ""
+ disabled = disabled ? "GRAY." : ""
if (amount === 1) {
out += getEmojiByName("TRACKS.SINGLE." + (disabled) + (selected === 0 ? "ACTIVE" : "INACTIVE"));
} else {
@@ -23,7 +23,7 @@
export const verticalTrackIndicator = (position: number, active: string | boolean, size: number, disabled: string | boolean) => {
active = active ? "ACTIVE" : "INACTIVE";
- disabled = disabled ? "GREY." : "";
+ disabled = disabled ? "GRAY." : "";
if (position === 0 && size === 1) return "TRACKS.SINGLE." + disabled + active;
if (position === size - 1) return "TRACKS.VERTICAL.BOTTOM." + disabled + active;
if (position === 0) return "TRACKS.VERTICAL.TOP." + disabled + active;