Skip to content

Commit

Permalink
start replacing some stuff with the global settings
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Jul 22, 2023
1 parent 431bfb3 commit 0fb0edd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "src/index.ts",
"type": "commonjs",
"scripts": {
"dev": "ts-node-dev --respawn -r tsconfig-paths/register src/index.ts",
"dev": "ts-node-dev --respawn -r tsconfig-paths/register --ignore-watch json/dynamic/ src/index.ts",
"start": "node -r ts-node/register -r tsconfig-paths/register src/index.ts",
"prettier": "prettier \"{,!(node_modules)/**/}*.ts\" --config .prettierrc --write"
},
Expand Down
1 change: 1 addition & 0 deletions src/helpers/functions/canvas/tile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export async function tileCanvas(options: options): Promise<Canvas> {

if (options?.random == "rotation") {
// grid to get all possible rotation states matched with each other
// specific configuration originally by Pomi108
const angles = [
[0, 180, 0],
[90, 0, 270],
Expand Down
3 changes: 2 additions & 1 deletion src/helpers/functions/errorHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { err } from "@helpers/logger";
import { colors } from "@helpers/colors";
import { Log } from "client/client";
import path from "path";
import settings from "@json/dynamic/settings.json";

const randomSentences: Array<string> = [
"Oh no, not again!",
Expand Down Expand Up @@ -161,7 +162,7 @@ export const errorHandler: Function = async (client: Client, reason: any, type:
}*/

const embed = new MessageEmbed()
.setAuthor({ name: type, iconURL: `${client.config.images}bot/error.png` }) // much compressed than .title() & .thumbnail()
.setAuthor({ name: type, iconURL: settings.images.error }) // much compressed than .title() & .thumbnail()
.setColor(colors.red)
.setTimestamp()
.setFooter({ text: client.user.username, iconURL: client.user.avatarURL() });
Expand Down
3 changes: 2 additions & 1 deletion src/helpers/functions/missing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Client } from "@client";
import { AnyChannel, VoiceChannel } from "discord.js";
import { join, normalize } from "path";
import { includesNone, normalizeArray } from "@helpers/arrays";
import settings from "@json/dynamic/settings.json";

import os from "os";
import BLACKLIST from "@json/blacklisted_textures.json";
Expand Down Expand Up @@ -69,7 +70,7 @@ export const computeAndUpdate = async (
let channel: AnyChannel;
try {
channel = await client.channels.fetch(
client.config.packProgress[results[2].pack][results[2].edition],
settings.channels.pack_progress[results[2].pack][results[2].edition],
);
} catch {
/* channel doesn't exist or can't be fetched */
Expand Down

0 comments on commit 0fb0edd

Please sign in to comment.