From 3e6844ed1027b34594945263764015cb6f5f0323 Mon Sep 17 00:00:00 2001 From: Ean Milligan Date: Sat, 3 May 2025 20:53:17 -0400 Subject: [PATCH] remove mod.d.ts since all types have been relocated now --- artificer.rc | 2 +- artificer.service | 2 +- src/commands/emoji.ts | 9 ++++++++- src/intervals.ts | 8 ++++++-- src/mod.d.ts | 14 -------------- start.command | 2 +- 6 files changed, 17 insertions(+), 20 deletions(-) delete mode 100644 src/mod.d.ts diff --git a/artificer.rc b/artificer.rc index df85f26..a6f0a08 100644 --- a/artificer.rc +++ b/artificer.rc @@ -10,7 +10,7 @@ pidfile="/var/dbots/TheArtificer/artificer.pid" artificer_root="/var/dbots/TheArtificer" artificer_write="./logs/,./src/endpoints/gets/heatmap.png" -artificer_read="./src/artigen/,./src/endpoints/gets/heatmap-base.png,./src/endpoints/gets/heatmap.png,./config.ts,./deps.ts,./flags.ts,./src/mod.d.ts" +artificer_read="./src/artigen/,./src/endpoints/gets/heatmap-base.png,./src/endpoints/gets/heatmap.png,./config.ts,./flags.ts" artificer_log="/var/log/artificer.log" artificer_chdir="${artificer_root}" diff --git a/artificer.service b/artificer.service index ad0bd7f..b9aca48 100644 --- a/artificer.service +++ b/artificer.service @@ -6,7 +6,7 @@ After=network.target [Service] Type=simple PIDFile=/run/deno.pid -ExecStart=/root/.deno/bin/deno run --allow-write=./logs/,./src/endpoints/gets/heatmap.png --allow-read=./src/artigen/,./src/endpoints/gets/heatmap-base.png,./src/endpoints/gets/heatmap.png,./config.ts,./deps.ts,./flags.ts,./src/mod.d.ts --allow-net --allow-import .\mod.ts +ExecStart=/root/.deno/bin/deno run --allow-write=./logs/,./src/endpoints/gets/heatmap.png --allow-read=./src/artigen/,./src/endpoints/gets/heatmap-base.png,./src/endpoints/gets/heatmap.png,./config.ts,./flags.ts --allow-net --allow-import .\mod.ts RestartSec=60 Restart=on-failure diff --git a/src/commands/emoji.ts b/src/commands/emoji.ts index 46ac082..864867d 100644 --- a/src/commands/emoji.ts +++ b/src/commands/emoji.ts @@ -6,9 +6,16 @@ import config from '~config'; import dbClient from 'db/client.ts'; import { queries } from 'db/common.ts'; -import { EmojiConf } from 'src/mod.d.ts'; import utils from 'src/utils.ts'; +interface EmojiConf { + name: string; + aliases: string[]; + id: string; + animated: boolean; + deleteSender: boolean; +} + const allEmojiAliases: string[] = []; config.emojis.forEach((curEmoji: EmojiConf) => { diff --git a/src/intervals.ts b/src/intervals.ts index de2c1f7..f639a62 100644 --- a/src/intervals.ts +++ b/src/intervals.ts @@ -12,9 +12,13 @@ import config from '~config'; import dbClient from 'db/client.ts'; import { weekDays } from 'db/common.ts'; -import { PastCommandCount } from 'src/mod.d.ts'; import utils from 'src/utils.ts'; +interface PastCommandCount { + command: string; + count: number; +} + // getRandomStatus() returns status as string // Gets a new random status for the bot const getRandomStatus = async (): Promise => { @@ -193,7 +197,7 @@ const updateHeatmapPng = async () => { hourPixels[hour][0] + 1, dayPixels[day][1] - dayPixels[day][0] + 1, hourPixels[hour][1] - hourPixels[hour][0] + 1, - Image.rgbToColor(255 * (1 - percent), 255 * percent, 0), + Image.rgbToColor(255 * (1 - percent), 255 * percent, 0) ); } } diff --git a/src/mod.d.ts b/src/mod.d.ts deleted file mode 100644 index 97e2866..0000000 --- a/src/mod.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -// EmojiConf is used as a structure for the emojis stored in config.ts -export interface EmojiConf { - name: string; - aliases: string[]; - id: string; - animated: boolean; - deleteSender: boolean; -} - -// PastCommandCount is used in calculating the hourly rate of commands -export interface PastCommandCount { - command: string; - count: number; -} diff --git a/start.command b/start.command index d5f9fdb..b1a38c5 100644 --- a/start.command +++ b/start.command @@ -1 +1 @@ -deno run --allow-write=./logs/,./src/endpoints/gets/heatmap.png --allow-read=./src/artigen/,./src/endpoints/gets/heatmap-base.png,./src/endpoints/gets/heatmap.png,./config.ts,./deps.ts,./flags.ts,./src/mod.d.ts --allow-net --allow-import mod.ts +deno run --allow-write=./logs/,./src/endpoints/gets/heatmap.png --allow-read=./src/artigen/,./src/endpoints/gets/heatmap-base.png,./src/endpoints/gets/heatmap.png,./config.ts,./flags.ts --allow-net --allow-import mod.ts