Merge branch 'dev' into 'main'
Updated all colorlog imports with color See merge request illegitimate/illegitimate-bot!210
This commit is contained in:
@@ -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")
|
||||||
|
|||||||
@@ -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")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
import { Bot as Illegitimate } from "utils/Illegitimate"
|
import { Illegitimate } from "utils/Illegitimate"
|
||||||
|
|
||||||
new Illegitimate().start()
|
new Illegitimate().start()
|
||||||
|
|||||||
@@ -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"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ if (process.env.NODE_ENV === "dev" && process.env.TYPESCRIPT === "true") {
|
|||||||
ft = "js"
|
ft = "js"
|
||||||
}
|
}
|
||||||
|
|
||||||
class Bot {
|
class Illegitimate {
|
||||||
async start() {
|
async start() {
|
||||||
this.init()
|
this.init()
|
||||||
loadAllEvents(client, ft)
|
loadAllEvents(client, ft)
|
||||||
@@ -49,4 +49,4 @@ class Bot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Bot, client, redis }
|
export { Illegitimate, client, redis }
|
||||||
|
|||||||
Reference in New Issue
Block a user