Updated type system

This commit is contained in:
2025-01-12 19:14:08 +01:00
parent 69061ba41d
commit 4f1ea148c5
88 changed files with 110 additions and 118 deletions

View File

@@ -1,10 +1,10 @@
import { userMention } from "discord.js"
import { embedColor } from "~/config/options.js"
import { IEvent } from "~/interfaces"
import { Event } from "~/typings"
import { dateTimeFormatter } from "~/utils/Functions/intlFormaters.js"
import logToChannel from "~/utils/Functions/logtochannel.js"
const event: IEvent<"guildMemberAdd"> = (member) => {
const event: Event<"guildMemberAdd"> = (member) => {
if (process.env.NODE_ENV === "dev") return
logToChannel("bot", {
embeds: [{

View File

@@ -1,7 +1,7 @@
import { IEvent } from "~/interfaces"
import { Event } from "~/typings"
import { log } from "~/utils/Logger.js"
const event: IEvent<"interactionCreate"> = (interaction) => {
const event: Event<"interactionCreate"> = (interaction) => {
if (interaction.isChatInputCommand()) {
let subcommand: string | null

View File

@@ -1,7 +1,7 @@
import { IEvent } from "~/interfaces"
import { Event } from "~/typings"
import { log } from "~/utils/Logger.js"
const event: IEvent<"ready"> = (client) => {
const event: Event<"ready"> = (client) => {
log("Logged in as " + client.user!.tag + "!", "info", { type: "preset", color: "green" })
}

View File

@@ -1,8 +1,8 @@
import { embedColor } from "~/config/options.js"
import { IEvent } from "~/interfaces"
import { Event } from "~/typings"
import logToChannel from "~/utils/Functions/logtochannel.js"
const event: IEvent<"ready"> = () => {
const event: Event<"ready"> = () => {
if (process.env.NODE_ENV === "dev") return
logToChannel("online", {

View File

@@ -1,9 +1,9 @@
import { Guild } from "discord.js"
import { guildid } from "~/config/options.js"
import statuses from "~/config/statuses.js"
import { IEvent } from "~/interfaces"
import { Event } from "~/typings"
const event: IEvent<"ready"> = (client) => {
const event: Event<"ready"> = (client) => {
const user = client.user!
const guild = client.guilds.cache.get(guildid) as Guild

View File

@@ -1,6 +1,6 @@
import { IEvent } from "~/interfaces"
import { Event } from "~/typings"
const event: IEvent<"voiceStateUpdate"> = (_o, n) => {
const event: Event<"voiceStateUpdate"> = (_o, n) => {
const guild = n.guild
if (!guild) return