From 3bee26145367afadaf93b6ff185577e997058a4c Mon Sep 17 00:00:00 2001 From: Taken Date: Tue, 30 Jan 2024 11:57:50 +0100 Subject: [PATCH] Updated all colorlog imports with color Signed-off-by: Taken --- src/commands/staff/updatediscordroles.ts | 8 ++++---- src/components/buttons/guildapplicationaccept.ts | 4 ++-- src/events/cron/weeklyGexp.ts | 4 ++-- src/utils/Events/autocomplete.ts | 4 ++-- src/utils/Events/button.ts | 4 ++-- src/utils/Events/command.ts | 4 ++-- src/utils/Events/contextmenu.ts | 4 ++-- src/utils/Events/modal.ts | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/commands/staff/updatediscordroles.ts b/src/commands/staff/updatediscordroles.ts index 9f3e79a..558c890 100644 --- a/src/commands/staff/updatediscordroles.ts +++ b/src/commands/staff/updatediscordroles.ts @@ -1,6 +1,6 @@ import verify from "schemas/verifySchema" import { embedColor, hypixelGuildID } from "config/options" -import colorLog from "utils/functions/colors" +import color from "utils/functions/colors" import { verifyTick } from "config/roles" import roleManage from "utils/functions/rolesmanage" import { ChatInputCommandInteraction, GuildMember } from "discord.js" @@ -64,7 +64,7 @@ export default async function updateDiscordRoles(interaction: ChatInputCommandIn for (const gmember of guildMembers) { const memberData = verifiedUsers.find(user => user.userID === gmember.id) - console.log(colorLog("Updating member " + i + " of " + guildMembers.length, "green")) + console.log(color("Updating member " + i + " of " + guildMembers.length, "green")) i++ if (!memberData) { @@ -73,7 +73,7 @@ export default async function updateDiscordRoles(interaction: ChatInputCommandIn continue } else { await gmember.member.roles.add(verifyTick) - console.log(colorLog(" Added verified tick to " + gmember.member.user.username, "lavender")) + console.log(color(" Added verified tick to " + gmember.member.user.username, "lavender")) } if (!guildMemberIDs.includes(memberData?.uuid || "none")) { @@ -82,7 +82,7 @@ export default async function updateDiscordRoles(interaction: ChatInputCommandIn continue } else if (guildMemberIDs.includes(memberData!.uuid)) { const guildMemberRank = hypixelGuildMembers.find(gmember => gmember.uuid === memberData!.uuid)!.rank - console.log(colorLog(" Updating roles for " + gmember.member.user.username, "lavender")) + console.log(color(" Updating roles for " + gmember.member.user.username, "lavender")) if (guildMemberRank === "Guild Master") { const rolesmanage = roleManage("gm") diff --git a/src/components/buttons/guildapplicationaccept.ts b/src/components/buttons/guildapplicationaccept.ts index 9749f23..856aaac 100644 --- a/src/components/buttons/guildapplicationaccept.ts +++ b/src/components/buttons/guildapplicationaccept.ts @@ -1,6 +1,6 @@ import { ActionRowBuilder, ButtonStyle, ButtonBuilder, TextChannel } from "discord.js" import { embedColor, waitingListChannel, waitingListMessage, hypixelGuildID } from "config/options" -import colorLog from "utils/functions/colors" +import color from "utils/functions/colors" import mongoose from "mongoose" import guildapp from "schemas/guildAppSchema" import waitingList from "schemas/waitinglistSchema" @@ -132,7 +132,7 @@ export = { }) } catch (err) { console.log( - colorLog("Error while trying to update waiting list.", "red") + color("Error while trying to update waiting list.", "red") ) } } diff --git a/src/events/cron/weeklyGexp.ts b/src/events/cron/weeklyGexp.ts index 88fb6f4..1877633 100644 --- a/src/events/cron/weeklyGexp.ts +++ b/src/events/cron/weeklyGexp.ts @@ -1,5 +1,5 @@ import { hypixelGuildID, guildLogChannel, embedColor, devMessage } from "config/options" -import colorLog from "utils/functions/colors" +import color from "utils/functions/colors" import { getGuild, getIGN } from "utils/Hypixel" import { Cron, GuildData } from "interfaces" import { client } from "utils/Illegitimate" @@ -9,7 +9,7 @@ async function guildWeekly() { const channel = client.channels.cache.get(guildLogChannel) as TextChannel if (!channel) { - console.log(colorLog("Guild log channel not found", "red")) + console.log(color("Guild log channel not found", "red")) return } diff --git a/src/utils/Events/autocomplete.ts b/src/utils/Events/autocomplete.ts index adf4ff8..62066f9 100644 --- a/src/utils/Events/autocomplete.ts +++ b/src/utils/Events/autocomplete.ts @@ -2,7 +2,7 @@ import { ExtendedClient as Client } from "utils/Client" import { embedColor } from "config/options" import { Autocomplete } from "interfaces" import { Events } from "discord.js" -import colorLog from "utils/functions/colors" +import color from "utils/functions/colors" import path from "path" import fs from "fs" import logToChannel from "utils/functions/logtochannel" @@ -20,7 +20,7 @@ export default function loadAutocompleteEvents(client: Client, ft: FileType) { client.autocomplete.set(autocomplete.name, autocomplete) } else { console.log( - colorLog( + color( `[WARNING] The autocomplete at ${filePath} is missing a required "name", "execute" or "type" property.`, "red" ) diff --git a/src/utils/Events/button.ts b/src/utils/Events/button.ts index e14917c..d90d42c 100644 --- a/src/utils/Events/button.ts +++ b/src/utils/Events/button.ts @@ -1,5 +1,5 @@ import { ExtendedClient as Client } from "utils/Client" -import colorLog from "utils/functions/colors" +import color from "utils/functions/colors" import { embedColor } from "config/options" import { Button } from "interfaces" import { Events } from "discord.js" @@ -20,7 +20,7 @@ export default function loadButtonEvents(client: Client, ft: FileType) { client.buttons.set(btn.name, btn) } else { console.log( - colorLog( + color( `[WARNING] The button at ${filePath} is missing a required "name", "execute" or "type" property.`, "red" ) diff --git a/src/utils/Events/command.ts b/src/utils/Events/command.ts index 9e07c10..277e3a2 100644 --- a/src/utils/Events/command.ts +++ b/src/utils/Events/command.ts @@ -1,5 +1,5 @@ import { ExtendedClient as Client } from "utils/Client" -import colorLog from "utils/functions/colors" +import color from "utils/functions/colors" import { embedColor } from "config/options" import { Command } from "interfaces" import { Events } from "discord.js" @@ -20,7 +20,7 @@ export default function loadSlashCommandsEvents(client: Client, ft: FileType) { client.commands.set(cmd.data.name, cmd) } else { console.log( - colorLog( + color( `[WARNING] The command at ${filePath} is missing a required "data", "execute" or "type" property.`, "red" ) diff --git a/src/utils/Events/contextmenu.ts b/src/utils/Events/contextmenu.ts index 19f6716..c71530c 100644 --- a/src/utils/Events/contextmenu.ts +++ b/src/utils/Events/contextmenu.ts @@ -1,5 +1,5 @@ import { ExtendedClient as Client } from "utils/Client" -import colorLog from "utils/functions/colors" +import color from "utils/functions/colors" import { ContextMenu } from "interfaces" import { embedColor } from "config/options" import { Events } from "discord.js" @@ -20,7 +20,7 @@ export default function loadContextMenuEvents(client: Client, ft: FileType) { client.contextmenus.set(cmd.data.name, cmd) } else { console.log( - colorLog( + color( `[WARNING] The command at ${filePath} is missing a required "data", "execute" or "type" property.`, "red" ) diff --git a/src/utils/Events/modal.ts b/src/utils/Events/modal.ts index 345a0be..8a06237 100644 --- a/src/utils/Events/modal.ts +++ b/src/utils/Events/modal.ts @@ -1,5 +1,5 @@ import { ExtendedClient as Client } from "utils/Client" -import colorLog from "utils/functions/colors" +import color from "utils/functions/colors" import { embedColor } from "config/options" import { Modal } from "interfaces" import { Events } from "discord.js" @@ -20,7 +20,7 @@ export default function loadModalEvents(client: Client, ft: FileType) { client.modals.set(modal.name, modal) } else { console.log( - colorLog( + color( `[WARNING] The modal at ${filePath} is missing a required "name", "execute" or "type" property.`, "red" )