Updated all colorlog imports with color

Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
2024-01-30 11:57:50 +01:00
parent 27bff1a007
commit 3bee261453
8 changed files with 18 additions and 18 deletions

View File

@@ -1,6 +1,6 @@
import verify from "schemas/verifySchema" import verify from "schemas/verifySchema"
import { embedColor, hypixelGuildID } from "config/options" import { embedColor, hypixelGuildID } from "config/options"
import colorLog from "utils/functions/colors" import color from "utils/functions/colors"
import { verifyTick } from "config/roles" import { verifyTick } from "config/roles"
import roleManage from "utils/functions/rolesmanage" import roleManage from "utils/functions/rolesmanage"
import { ChatInputCommandInteraction, GuildMember } from "discord.js" import { ChatInputCommandInteraction, GuildMember } from "discord.js"
@@ -64,7 +64,7 @@ export default async function updateDiscordRoles(interaction: ChatInputCommandIn
for (const gmember of guildMembers) { for (const gmember of guildMembers) {
const memberData = verifiedUsers.find(user => user.userID === gmember.id) 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++ i++
if (!memberData) { if (!memberData) {
@@ -73,7 +73,7 @@ export default async function updateDiscordRoles(interaction: ChatInputCommandIn
continue continue
} else { } else {
await gmember.member.roles.add(verifyTick) 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")) { if (!guildMemberIDs.includes(memberData?.uuid || "none")) {
@@ -82,7 +82,7 @@ export default async function updateDiscordRoles(interaction: ChatInputCommandIn
continue continue
} else if (guildMemberIDs.includes(memberData!.uuid)) { } else if (guildMemberIDs.includes(memberData!.uuid)) {
const guildMemberRank = hypixelGuildMembers.find(gmember => gmember.uuid === memberData!.uuid)!.rank 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") { if (guildMemberRank === "Guild Master") {
const rolesmanage = roleManage("gm") const rolesmanage = roleManage("gm")

View File

@@ -1,6 +1,6 @@
import { ActionRowBuilder, ButtonStyle, ButtonBuilder, TextChannel } from "discord.js" import { ActionRowBuilder, ButtonStyle, ButtonBuilder, TextChannel } from "discord.js"
import { embedColor, waitingListChannel, waitingListMessage, hypixelGuildID } from "config/options" 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 mongoose from "mongoose"
import guildapp from "schemas/guildAppSchema" import guildapp from "schemas/guildAppSchema"
import waitingList from "schemas/waitinglistSchema" import waitingList from "schemas/waitinglistSchema"
@@ -132,7 +132,7 @@ export = {
}) })
} catch (err) { } catch (err) {
console.log( console.log(
colorLog("Error while trying to update waiting list.", "red") color("Error while trying to update waiting list.", "red")
) )
} }
} }

View File

@@ -1,5 +1,5 @@
import { hypixelGuildID, guildLogChannel, embedColor, devMessage } from "config/options" 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 { getGuild, getIGN } from "utils/Hypixel"
import { Cron, GuildData } from "interfaces" import { Cron, GuildData } from "interfaces"
import { client } from "utils/Illegitimate" import { client } from "utils/Illegitimate"
@@ -9,7 +9,7 @@ async function guildWeekly() {
const channel = client.channels.cache.get(guildLogChannel) as TextChannel const channel = client.channels.cache.get(guildLogChannel) as TextChannel
if (!channel) { if (!channel) {
console.log(colorLog("Guild log channel not found", "red")) console.log(color("Guild log channel not found", "red"))
return return
} }

View File

@@ -2,7 +2,7 @@ import { ExtendedClient as Client } from "utils/Client"
import { embedColor } from "config/options" import { embedColor } from "config/options"
import { Autocomplete } from "interfaces" import { Autocomplete } from "interfaces"
import { Events } from "discord.js" import { Events } from "discord.js"
import colorLog from "utils/functions/colors" import color from "utils/functions/colors"
import path from "path" import path from "path"
import fs from "fs" import fs from "fs"
import logToChannel from "utils/functions/logtochannel" import logToChannel from "utils/functions/logtochannel"
@@ -20,7 +20,7 @@ export default function loadAutocompleteEvents(client: Client, ft: FileType) {
client.autocomplete.set(autocomplete.name, autocomplete) client.autocomplete.set(autocomplete.name, autocomplete)
} else { } else {
console.log( console.log(
colorLog( color(
`[WARNING] The autocomplete at ${filePath} is missing a required "name", "execute" or "type" property.`, `[WARNING] The autocomplete at ${filePath} is missing a required "name", "execute" or "type" property.`,
"red" "red"
) )

View File

@@ -1,5 +1,5 @@
import { ExtendedClient as Client } from "utils/Client" 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 { embedColor } from "config/options"
import { Button } from "interfaces" import { Button } from "interfaces"
import { Events } from "discord.js" import { Events } from "discord.js"
@@ -20,7 +20,7 @@ export default function loadButtonEvents(client: Client, ft: FileType) {
client.buttons.set(btn.name, btn) client.buttons.set(btn.name, btn)
} else { } else {
console.log( console.log(
colorLog( color(
`[WARNING] The button at ${filePath} is missing a required "name", "execute" or "type" property.`, `[WARNING] The button at ${filePath} is missing a required "name", "execute" or "type" property.`,
"red" "red"
) )

View File

@@ -1,5 +1,5 @@
import { ExtendedClient as Client } from "utils/Client" 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 { embedColor } from "config/options"
import { Command } from "interfaces" import { Command } from "interfaces"
import { Events } from "discord.js" import { Events } from "discord.js"
@@ -20,7 +20,7 @@ export default function loadSlashCommandsEvents(client: Client, ft: FileType) {
client.commands.set(cmd.data.name, cmd) client.commands.set(cmd.data.name, cmd)
} else { } else {
console.log( console.log(
colorLog( color(
`[WARNING] The command at ${filePath} is missing a required "data", "execute" or "type" property.`, `[WARNING] The command at ${filePath} is missing a required "data", "execute" or "type" property.`,
"red" "red"
) )

View File

@@ -1,5 +1,5 @@
import { ExtendedClient as Client } from "utils/Client" import { ExtendedClient as Client } from "utils/Client"
import colorLog from "utils/functions/colors" import color from "utils/functions/colors"
import { ContextMenu } from "interfaces" import { ContextMenu } from "interfaces"
import { embedColor } from "config/options" import { embedColor } from "config/options"
import { Events } from "discord.js" import { Events } from "discord.js"
@@ -20,7 +20,7 @@ export default function loadContextMenuEvents(client: Client, ft: FileType) {
client.contextmenus.set(cmd.data.name, cmd) client.contextmenus.set(cmd.data.name, cmd)
} else { } else {
console.log( console.log(
colorLog( color(
`[WARNING] The command at ${filePath} is missing a required "data", "execute" or "type" property.`, `[WARNING] The command at ${filePath} is missing a required "data", "execute" or "type" property.`,
"red" "red"
) )

View File

@@ -1,5 +1,5 @@
import { ExtendedClient as Client } from "utils/Client" 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 { embedColor } from "config/options"
import { Modal } from "interfaces" import { Modal } from "interfaces"
import { Events } from "discord.js" import { Events } from "discord.js"
@@ -20,7 +20,7 @@ export default function loadModalEvents(client: Client, ft: FileType) {
client.modals.set(modal.name, modal) client.modals.set(modal.name, modal)
} else { } else {
console.log( console.log(
colorLog( color(
`[WARNING] The modal at ${filePath} is missing a required "name", "execute" or "type" property.`, `[WARNING] The modal at ${filePath} is missing a required "name", "execute" or "type" property.`,
"red" "red"
) )