From c38ca862f9e999f112db0b32ef6bc932ee1396d8 Mon Sep 17 00:00:00 2001 From: Evorp <3vorpgaming@gmail.com> Date: Sat, 22 Jul 2023 16:32:20 -0700 Subject: [PATCH] remove images entirely --- json/config.json | 1 - src/commands/bot/stats.ts | 3 ++- src/helpers/interfaces/config.ts | 1 - src/helpers/sorter.ts | 7 +++---- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/json/config.json b/json/config.json index a23550441..b0ab251d0 100644 --- a/json/config.json +++ b/json/config.json @@ -1,5 +1,4 @@ { - "images": "https://database.faithfulpack.net/images/", "teams": [ { "name": "faithful", diff --git a/src/commands/bot/stats.ts b/src/commands/bot/stats.ts index 3c08edcbb..c38e19e5c 100644 --- a/src/commands/bot/stats.ts +++ b/src/commands/bot/stats.ts @@ -5,6 +5,7 @@ import { Collection, Guild, version as djsVersion } from "discord.js"; import { Client, MessageEmbed, CommandInteraction, Message } from "@client"; import os from "os"; import linuxOs from "linux-os-info"; +import settings from "@json/dynamic/settings.json"; export const command: SlashCommand = { data: new SlashCommandBuilder() @@ -63,7 +64,7 @@ export const command: SlashCommand = { ) .setFooter({ text: await interaction.getEphemeralString({ string: "Command.Stats.Footer" }), - iconURL: `${client.config.images}bot/heart.png`, + iconURL: settings.images.heart, }); interaction .reply({ embeds: [embed], fetchReply: true }) diff --git a/src/helpers/interfaces/config.ts b/src/helpers/interfaces/config.ts index f14eb7e30..2c070bed6 100644 --- a/src/helpers/interfaces/config.ts +++ b/src/helpers/interfaces/config.ts @@ -1,5 +1,4 @@ export interface Config { - images: string; teams: Array; discords: Array; } diff --git a/src/helpers/sorter.ts b/src/helpers/sorter.ts index 5c016b989..019660bb4 100644 --- a/src/helpers/sorter.ts +++ b/src/helpers/sorter.ts @@ -1,6 +1,5 @@ import { Texture } from "@helpers/interfaces/firestorm"; import { EmbedFieldData } from "discord.js"; -import ConfigJson from "@json/config.json"; /** * Sort Minecraft Version Numbers @@ -71,7 +70,7 @@ export const addPathsToEmbed = (texture: Texture): EmbedFieldData[] => { export const formatName = (pack: string, size: string = "512"): string[] => { // TODO: migrate from old config (ideally move to API if possible) let strPack: string; - let strIconURL = ConfigJson.images + `branding/logos/transparent/${size}/`; + let strIconURL = `https://database.faithfulpack.net/images/branding/logos/transparent/${size}/`; switch (pack) { case "faithful_32x": strPack = "Faithful 32x"; @@ -95,11 +94,11 @@ export const formatName = (pack: string, size: string = "512"): string[] => { break; case "progart": strPack = "Default Programmer Art"; - strIconURL = ConfigJson.images + "bot/progart.png?w=64"; // have to redefine since the directory is different + strIconURL = `https://database.faithfulpack.net/images/bot/progart.png?w=64`; // have to redefine since the directory is different break; default: strPack = "Default Jappa"; - strIconURL = ConfigJson.images + "bot/default.png?w=64"; + strIconURL = `https://database.faithfulpack.net/images/bot/default.png?w=64`; break; } return [strPack, strIconURL];