Updated types for channels

This commit is contained in:
2024-01-06 23:28:37 +01:00
parent 2b92750778
commit d06e15c96c
15 changed files with 43 additions and 147 deletions

View File

@@ -1,7 +1,7 @@
import { ExtendedClient as Client } from "../Client"
import { errorLogChannel, color } from "../../../config/options.json"
import { Modal } from "../../interfaces"
import { Events, GuildTextBasedChannel } from "discord.js"
import { Events, TextChannel } from "discord.js"
import path = require("path")
import fs = require("fs")
type FileType = "js" | "ts"
@@ -44,7 +44,7 @@ export default function loadModalEvents(client: Client, ft: FileType) {
if (process.env.NODE_ENV !== "dev") {
const channel = client.channels.cache.get(
errorLogChannel,
) as GuildTextBasedChannel
) as TextChannel
if (!channel) {
console.log("No error log channel found.")
}