Updated all color vars to new one

Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
2024-01-30 11:52:52 +01:00
parent 1d3b77ae35
commit 27bff1a007
60 changed files with 61 additions and 137 deletions

View File

@@ -1,6 +1,6 @@
import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember, } from "discord.js"
import { admin, helper } from "config/roles"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { Command } from "interfaces"
import logToChannel from "utils/functions/logtochannel"
@@ -47,7 +47,6 @@ export = {
const member = interaction.options.getMember("user") as GuildMember | null
const reason = interaction.options.getString("reason") ?? "No reason provided."
const messageDeletionDays = interaction.options.getNumber("messagedeletiondays") ?? 0
const embedColor = Number(color.replace("#", "0x"))
if (!member) {
await interaction.editReply("You must specify a user.")

View File

@@ -1,6 +1,6 @@
import { SlashCommandBuilder } from "discord.js"
import { Command } from "interfaces"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import os from "os"
import { execSync } from "child_process"
const { dependencies, devDependencies } = require("../../package.json")
@@ -17,7 +17,6 @@ export = {
.setDMPermission(false),
async execute(interaction, client) {
const embedColor = Number(color.replace("#", "0x"))
const castedDeps = dependencies as { [key: string]: string }
const castedDevDeps = devDependencies as { [key: string]: string }
let osInfo: string

View File

@@ -1,6 +1,6 @@
import { SlashCommandBuilder } from "discord.js"
import { bwfkdr, bwstars, bwwins, swstars, swkdr, duelswins, duelswlr } from "config/reqs"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { hypixelLevel, bedwarsLevel, skywarsLevel, getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel"
import { Command } from "interfaces"
@@ -27,7 +27,6 @@ export = {
await interaction.deferReply({})
const ign = interaction.options.getString("ign")!
const embedColor = Number(color.replace("#", "0x"))
await interaction.editReply({
embeds: [{

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder, PermissionFlagsBits, TextChannel, channelMention, userMention } from "discord.js"
import { color } from "config/options"
import { embedColor } from "config/options"
import { Command } from "interfaces"
import logToChannel from "utils/functions/logtochannel"
@@ -26,7 +26,6 @@ export = {
const amount = interaction.options.getInteger("amount")!
const channel = interaction.channel as TextChannel
const embedColor = Number(color.replace("#", "0x"))
if (amount < 1 || amount > 100) {
await interaction.editReply({

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js"
import { color } from "config/options"
import { embedColor } from "config/options"
import settings from "schemas/settingsSchema"
import mongoose from "mongoose"
import { Command } from "interfaces"
@@ -37,7 +37,6 @@ export = {
const setting = interaction.options.getString("setting")
const value = interaction.options.getString("value")
const embedColor = Number(color.replace("#", "0x"))
const settingsData = await settings.findOne({ name: setting })
if (!settingsData) {

View File

@@ -1,5 +1,5 @@
import { ChannelType, PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { Command } from "interfaces"
import setup from "./counting/setup"
import ban from "./counting/ban"
@@ -54,7 +54,6 @@ export = {
async execute(interaction) {
const subcommand = interaction.options.getSubcommand()
const embedColor = Number(color.replace("#", "0x"))
if (subcommand === "setup") {
setup(interaction)

View File

@@ -1,10 +1,9 @@
import { ChatInputCommandInteraction, GuildMember, userMention } from "discord.js"
import { countingBanned } from "config/roles"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
export default async function ban(interaction: ChatInputCommandInteraction): Promise<void> {
const member = interaction.options.getMember("user")! as GuildMember
const embedColor = Number(color.replace("#", "0x"))
if (member.roles.cache.has(countingBanned)) {
await interaction.reply({

View File

@@ -1,13 +1,12 @@
import { ChatInputCommandInteraction, TextChannel, channelMention } from "discord.js"
import settingsSchema from "schemas/settingsSchema"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import mongoose from "mongoose"
export default async function setup(interaction: ChatInputCommandInteraction): Promise<void> {
await interaction.deferReply()
const channel = interaction.options.getChannel("channel") as TextChannel
const embedColor = Number(color.replace("#", "0x"))
if (await settingsSchema.findOne({ name: "counting" })) {
await settingsSchema.findOneAndUpdate(

View File

@@ -1,10 +1,9 @@
import { ChatInputCommandInteraction, GuildMember, userMention } from "discord.js"
import { countingBanned } from "config/roles"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
export default async function ban(interaction: ChatInputCommandInteraction): Promise<void> {
const member = interaction.options.getMember("user")! as GuildMember
const embedColor = Number(color.replace("#", "0x"))
if (!member.roles.cache.has(countingBanned)) {
await interaction.reply({

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import verify from "schemas/verifySchema"
import { Command } from "interfaces"
import roleManage from "utils/functions/rolesmanage"
@@ -26,7 +26,6 @@ export = {
async execute(interaction) {
const member = interaction.options.getMember("user") as GuildMember
const embedColor = Number(color.replace("#", "0x"))
const verifiedUser = await verify.findOne({ userID: member.user.id })
const mod = interaction.user

View File

@@ -1,6 +1,6 @@
import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js"
import { getGuild, getHeadURL, getIGN } from "utils/Hypixel"
import { hypixelGuildID, color, devMessage } from "config/options"
import { hypixelGuildID, embedColor, devMessage } from "config/options"
import verify from "schemas/verifySchema"
import { Command } from "interfaces"
import roleManage from "utils/functions/rolesmanage"
@@ -29,7 +29,6 @@ export = {
const user = interaction.options.getMember("user") as GuildMember
const usermentioned = userMention(user.user.id)
const verifyData = await verify.findOne({ userID: user.user.id })
const embedColor = Number(color.replace("#", "0x"))
if (!verifyData) {
await interaction.editReply({

View File

@@ -1,6 +1,6 @@
import { SlashCommandBuilder, PermissionFlagsBits, GuildMember, userMention } from "discord.js"
import { getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel"
import { color, hypixelGuildID, devMessage } from "config/options"
import { embedColor, hypixelGuildID, devMessage } from "config/options"
import verify from "schemas/verifySchema"
import mongoose from "mongoose"
import roleManage from "utils/functions/rolesmanage"
@@ -35,7 +35,6 @@ export = {
const user = interaction.options.getMember("user") as GuildMember
const ign = interaction.options.getString("ign")
const mod = interaction.user
const embedColor = Number(color.replace("#", "0x"))
const verifyData = await verify.findOne({ userID: user.user.id })
if (verifyData) {

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { Command } from "interfaces"
import guildMember from "./guild/member"
import guildInfo from "./guild/info"
@@ -79,7 +79,6 @@ export = {
async execute(interaction) {
const subcommand = interaction.options.getSubcommand()
const embedColor = Number(color.replace("#", "0x"))
if (subcommand === "member") {
await guildMember(interaction)

View File

@@ -1,5 +1,5 @@
import { getUUID, getIGN, getPlayer, getGuild, guildLevel } from "utils/Hypixel"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { ChatInputCommandInteraction } from "discord.js"
import { GuildData } from "interfaces"
@@ -8,7 +8,6 @@ export default async function guildInfo(interaction: ChatInputCommandInteraction
const query = interaction.options.getString("query")!
const type = interaction.options.getString("type") || "ign"
const embedColor = Number(color.replace("#", "0x"))
let guild: GuildData | null
if (type === "ign") {

View File

@@ -1,12 +1,11 @@
import { getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { ChatInputCommandInteraction } from "discord.js"
export default async function guildMember(interaction: ChatInputCommandInteraction): Promise<void> {
await interaction.deferReply()
const ign = interaction.options.getString("ign")!
const embedColor = Number(color.replace("#", "0x"))
await interaction.editReply({
embeds: [{

View File

@@ -1,5 +1,5 @@
import { getUUID, getPlayer, getGuild, getIGN } from "utils/Hypixel"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { ChannelType, ChatInputCommandInteraction } from "discord.js"
import { GuildData } from "interfaces"
import { redis } from "utils/Illegitimate"
@@ -10,7 +10,6 @@ export default async function guildTop(interaction: ChatInputCommandInteraction)
const query = interaction.options.getString("query")!
const type = interaction.options.getString("type") || "ign"
let amount = interaction.options.getNumber("amount") || 10
const embedColor = Number(color.replace("#", "0x"))
let guild: GuildData | null
if (interaction.channel!.type === ChannelType.DM) {

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { Command } from "interfaces"
export = {
@@ -55,8 +55,6 @@ export = {
}
}
const embedColor = Number(color.replace("#", "0x"))
await interaction.editReply({
embeds: [{
title: "Commands",

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js"
import { color, devMessage, instructionsgif } from "config/options"
import { embedColor, devMessage, instructionsgif } from "config/options"
import { Command } from "interfaces"
export = {
@@ -15,8 +15,6 @@ export = {
.setDMPermission(false),
async execute(interaction) {
const embedColor = Number(color.replace("#", "0x"))
await interaction.reply({
embeds: [{
title: "Verification",

View File

@@ -1,6 +1,6 @@
import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js"
import { admin, helper } from "config/roles"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { Command } from "interfaces"
import logToChannel from "utils/functions/logtochannel"
@@ -32,8 +32,6 @@ export = {
const member = interaction.options.getMember("member") as GuildMember
const reason = interaction.options.getString("reason") ?? "No reason provided."
const embedColor = Number(color.replace("#", "0x"))
const mod = await interaction.guild!.members.fetch(interaction.user.id)
const memberRoles = member.roles.cache.map(role => role.id)
const modRoles = mod.roles.cache.map(role => role.id)

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { Command } from "interfaces"
export = {
@@ -15,9 +15,6 @@ export = {
async execute(interaction, client) {
await interaction.deferReply()
const embedColor = Number(color.replace("#", "0x"))
await interaction.editReply({
embeds: [{
description: "Ping of the bot is " + client.ws.ping + "ms.",

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder, User } from "discord.js"
import { color } from "config/options"
import { embedColor } from "config/options"
import { Command } from "interfaces"
import env from "utils/Env"
@@ -22,7 +22,6 @@ export = {
async execute(interaction) {
const user = (interaction.options.getUser("user") || interaction.user) as User
const embedColor = Number(color.replace("#", "0x"))
let size: number
if (user.id === env.prod.dev) {

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder, PermissionFlagsBits, userMention } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import waitinglistSchema from "schemas/waitinglistSchema"
import { Command } from "interfaces"
import logToChannel from "utils/functions/logtochannel"
@@ -34,8 +34,6 @@ export = {
const user = interaction.options.getUser("user")!
const reason = interaction.options.getString("reason") ?? "No reason provided."
const mod = interaction.user!
const embedColor = Number(color.replace("#", "0x"))
const waitinglist = await waitinglistSchema.findOne({ userID: user.id })
if (!waitinglist) {

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { bwfkdr, bwstars, bwwins, swstars, swkdr, duelswins, duelswlr } from "config/reqs"
import { Command } from "interfaces"
@@ -15,8 +15,6 @@ export = {
.setDMPermission(false),
async execute(interaction) {
const embedColor = Number(color.replace("#", "0x"))
await interaction.reply({
embeds: [{
title: "Requirements",

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder, PermissionFlagsBits, ChannelType, TextChannel } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { Command } from "interfaces"
export = {
@@ -31,7 +31,6 @@ export = {
const message = interaction.options.getString("message")!
const channel = (interaction.options.getChannel("channel") || interaction.channel) as TextChannel
const embedColor = Number(color.replace("#", "0x"))
channel.send({
embeds: [{

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { Command } from "interfaces"
import logToChannel from "utils/functions/logtochannel"
@@ -30,7 +30,6 @@ export = {
async execute(interaction) {
const member = interaction.options.getMember("user") as GuildMember
const nickname = interaction.options.getString("nickname")
const embedColor = Number(color.replace("#", "0x"))
if (!member.manageable) {
interaction.reply({

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder, PermissionFlagsBits, ButtonBuilder, ActionRowBuilder, ButtonStyle, ChannelType, TextChannel } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { Command } from "interfaces"
export = {
@@ -78,7 +78,6 @@ export = {
async execute(interaction) {
const subcommand = interaction.options.getSubcommand()
const channel = interaction.options.getChannel("channel") as TextChannel
const embedColor = Number(color.replace("#", "0x"))
let title = ""
let description = ""
let customId = ""

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder, PermissionFlagsBits, ChannelType, TextChannel, channelMention, userMention } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { Command } from "interfaces"
import logToChannel from "utils/functions/logtochannel"
@@ -31,7 +31,6 @@ export = {
const seconds = interaction.options.getInteger("seconds") ?? 5
const channel = (interaction.options.getChannel("channel") || interaction.channel) as TextChannel
const embedColor = Number(color.replace("#", "0x"))
if (seconds > 21600) {
await channel.setRateLimitPerUser(21600)

View File

@@ -1,7 +1,7 @@
import { GuildMember, SlashCommandBuilder } from "discord.js"
import snipeCacheSchema from "schemas/snipeCacheSchema"
import { Command } from "interfaces"
import { color } from "config/options"
import { embedColor } from "config/options"
import { SnipeCache } from "typings"
export = {
@@ -28,7 +28,6 @@ export = {
userid: member.user.id,
channelid: interaction.channel!.id
})
const embedColor = Number(color.replace("#", "0x"))
const messages: string[] = []
if (!snipeCache.length) {

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { Command } from "interfaces"
import help from "./staff/help"
import beast from "./staff/beast"
@@ -47,7 +47,6 @@ export = {
async execute(interaction, client) {
const subcommand = interaction.options.getSubcommand()
const embedColor = Number(color.replace("#", "0x"))
if (subcommand === "help") {
help(interaction, client)

View File

@@ -1,5 +1,5 @@
import { bwwins, beastbwfkdr, beastbwstars, beastswkdr, beastswstars, beastduelswins, duelswlr } from "config/reqs"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { hypixelLevel, bedwarsLevel, skywarsLevel, getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel"
import { ChatInputCommandInteraction } from "discord.js"
@@ -7,7 +7,6 @@ export default async function beast(interaction: ChatInputCommandInteraction): P
await interaction.deferReply()
const ign = interaction.options.getString("ign")!
const embedColor = Number(color.replace("#", "0x"))
if (!ign) {
await interaction.editReply("Please provide a player's IGN.")

View File

@@ -1,5 +1,5 @@
import { ChatInputCommandInteraction } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { ExtendedClient as Client } from "utils/Client"
export default async function help(interaction: ChatInputCommandInteraction, client: Client): Promise<void> {
@@ -42,8 +42,6 @@ export default async function help(interaction: ChatInputCommandInteraction, cli
}
}
const embedColor = Number(color.replace("#", "0x"))
await interaction.editReply({
embeds: [{
title: "Commands",

View File

@@ -1,5 +1,5 @@
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ChatInputCommandInteraction } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import env from "utils/Env"
export default async function prune(interaction: ChatInputCommandInteraction): Promise<void> {
@@ -10,7 +10,6 @@ export default async function prune(interaction: ChatInputCommandInteraction): P
return
}
const embedColor = Number(color.replace("#", "0x"))
const members = await interaction.guild!.members.fetch()
await interaction.editReply({

View File

@@ -1,5 +1,5 @@
import verify from "schemas/verifySchema"
import { color, hypixelGuildID } from "config/options"
import { embedColor, hypixelGuildID } from "config/options"
import colorLog from "utils/functions/colors"
import { verifyTick } from "config/roles"
import roleManage from "utils/functions/rolesmanage"
@@ -9,10 +9,10 @@ import { getGuild } from "utils/Hypixel"
import { GuildData } from "interfaces"
export default async function updateDiscordRoles(interaction: ChatInputCommandInteraction): Promise<void> {
const discordMember = interaction.member as GuildMember
const embedColor = Number(color.replace("#", "0x"))
await interaction.deferReply()
const discordMember = interaction.member as GuildMember
if (discordMember.user.id !== env.prod.dev) {
await interaction.editReply({
embeds: [{

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder, PermissionFlagsBits, userMention, ChatInputCommandInteraction, GuildMember } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { Command } from "interfaces"
import ms from "ms"
import logToChannel from "utils/functions/logtochannel"
@@ -40,7 +40,6 @@ export = {
const timeString = interaction.options.getString("time")!
const reason = interaction.options.getString("reason") || "No reason provided"
const mod = interaction.member! as GuildMember
const embedColor = Number(color.replace("#", "0x"))
const time = ms(timeString)
const { default: prettyMs } = await import("pretty-ms")
const prettyTime = prettyMs(time, { verbose: true })

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder, PermissionFlagsBits, userMention, User } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { Command } from "interfaces"
import logToChannel from "utils/functions/logtochannel"
@@ -34,7 +34,6 @@ export = {
const userid = interaction.options.getString("user")!
const reason = interaction.options.getString("reason") || "No reason provided"
const mod = interaction.user
const embedColor = Number(color.replace("#", "0x"))
let user: User
if (userid === "none") {

View File

@@ -1,7 +1,7 @@
import { GuildMember, SlashCommandBuilder } from "discord.js"
import { getGuild, getIGN, getHeadURL } from "utils/Hypixel"
import verify from "schemas/verifySchema"
import { color, hypixelGuildID, devMessage } from "config/options"
import { embedColor, hypixelGuildID, devMessage } from "config/options"
import roleManage from "utils/functions/rolesmanage"
import { Command } from "interfaces"
@@ -21,7 +21,6 @@ export = {
const user = interaction.member as GuildMember
const verifyData = await verify.findOne({ userID: user.user.id })
const embedColor = Number(color.replace("#", "0x"))
if (!verifyData) {
await interaction.editReply({

View File

@@ -1,5 +1,5 @@
import { SlashCommandBuilder } from "discord.js"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import { getUUID, getIGN, getHeadURL, formatUuid } from "utils/Hypixel"
import { Command } from "interfaces"
@@ -30,7 +30,6 @@ export = {
const formattedUuid = formatUuid(uuid)
const newIgn = (await getIGN(uuid)) as string
const head = await getHeadURL(ign)
const embedColor = Number(color.replace("#", "0x"))
if (!uuid) {
interaction.editReply({

View File

@@ -1,6 +1,6 @@
import { GuildMember, SlashCommandBuilder } from "discord.js"
import { getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel"
import { color, hypixelGuildID, devMessage } from "config/options"
import { embedColor, hypixelGuildID, devMessage } from "config/options"
import mongoose from "mongoose"
import roleManage from "utils/functions/rolesmanage"
import { Command } from "interfaces"
@@ -32,7 +32,6 @@ export = {
const user = interaction.member! as GuildMember
const ign = interaction.options.getString("ign")!
const embedColor = Number(color.replace("#", "0x"))
const verifyData = await verify.findOne({ userID: user.id })
if (verifyData) {

View File

@@ -1,6 +1,6 @@
import { SlashCommandBuilder, userMention } from "discord.js"
import { Command } from "interfaces"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import verify from "schemas/verifySchema"
import { getIGN, getHeadURL } from "utils/Hypixel"
@@ -20,7 +20,6 @@ export = {
const user = interaction.user
const verifyData = await verify.findOne({ userID: user.id })
const embedColor = Number(color.replace("#", "0x"))
if (!verifyData) {
await interaction.editReply({

View File

@@ -1,6 +1,6 @@
import { SlashCommandBuilder, PermissionFlagsBits, userMention } from "discord.js"
import { getIGN, getHeadURL } from "utils/Hypixel"
import { color, devMessage } from "config/options"
import { embedColor, devMessage } from "config/options"
import verify from "schemas/verifySchema"
import { Command } from "interfaces"
@@ -26,8 +26,6 @@ export = {
await interaction.deferReply()
const user = interaction.options.getUser("user")!
const embedColor = Number(color.replace("#", "0x"))
const verifiedUser = await verify.findOne({ userID: user.id })
if (!verifiedUser) {
interaction.editReply("You are not verified!")