Updated all files to new interfaces

This commit is contained in:
2024-02-16 16:03:04 +01:00
parent 137401630e
commit 769c3d12ed
77 changed files with 168 additions and 168 deletions

View File

@@ -1,6 +1,6 @@
import { ExtendedClient as Client } from "utils/Client"
import { embedColor } from "config/options"
import { Autocomplete } from "interfaces"
import { IAutocomplete } from "interfaces"
import { Events } from "discord.js"
import color from "utils/functions/colors"
import path from "path"
@@ -14,7 +14,7 @@ export default function loadAutocompleteEvents(client: Client, ft: FileType) {
for (const file of autocompleteFiles) {
const filePath = path.join(autocompletePath, file)
const autocomplete: Autocomplete = require(filePath)
const autocomplete: IAutocomplete = require(filePath)
if ("name" in autocomplete && "execute" in autocomplete) {
client.autocomplete.set(autocomplete.name, autocomplete)

View File

@@ -1,7 +1,7 @@
import { ExtendedClient as Client } from "utils/Client"
import color from "utils/functions/colors"
import { embedColor } from "config/options"
import { Button } from "interfaces"
import { IButton } from "interfaces"
import { Events } from "discord.js"
import path from "path"
import fs from "fs"
@@ -14,7 +14,7 @@ export default function loadButtonEvents(client: Client, ft: FileType) {
for (const file of btnFiles) {
const filePath = path.join(btnPath, file)
const btn: Button = require(filePath)
const btn: IButton = require(filePath)
if ("name" in btn && "execute" in btn) {
client.buttons.set(btn.name, btn)

View File

@@ -1,7 +1,7 @@
import { ExtendedClient as Client } from "utils/Client"
import color from "utils/functions/colors"
import { embedColor } from "config/options"
import { Command } from "interfaces"
import { ICommand } from "interfaces"
import { Events } from "discord.js"
import path from "path"
import fs from "fs"
@@ -14,7 +14,7 @@ export default function loadSlashCommandsEvents(client: Client, ft: FileType) {
for (const file of cmdFiles) {
const filePath = path.join(cmdPath, file)
const cmd: Command = require(filePath)
const cmd: ICommand = require(filePath)
if ("data" in cmd && "execute" in cmd) {
client.commands.set(cmd.data.name, cmd)

View File

@@ -1,6 +1,6 @@
import { ExtendedClient as Client } from "utils/Client"
import color from "utils/functions/colors"
import { ContextMenu } from "interfaces"
import { IContextMenu } from "interfaces"
import { embedColor } from "config/options"
import { Events } from "discord.js"
import path from "path"
@@ -14,7 +14,7 @@ export default function loadContextMenuEvents(client: Client, ft: FileType) {
for (const file of contextMenuFiles) {
const filePath = path.join(contextMenuPath, file)
const cmd: ContextMenu = require(filePath)
const cmd: IContextMenu = require(filePath)
if ("data" in cmd && "execute" in cmd) {
client.contextmenus.set(cmd.data.name, cmd)

View File

@@ -1,7 +1,7 @@
import { CronJob } from "cron"
import path from "path"
import fs from "fs"
import { Cron } from "interfaces"
import { ICron } from "interfaces"
export default function loadCronEvents() {
const cronPath = path.join(__dirname, "..", "..", "events", "cron")
@@ -9,7 +9,7 @@ export default function loadCronEvents() {
for (const file of cronFiles) {
const filePath = path.join(cronPath, file)
const cron: Cron = require(filePath)
const cron: ICron = require(filePath)
const time =
cron.time.seconds + " " +

View File

@@ -1,5 +1,5 @@
import { ExtendedClient as Client } from "utils/Client"
import { Event } from "interfaces"
import { IEvent } from "interfaces"
import path from "path"
import fs from "fs"
@@ -10,7 +10,7 @@ export default function loadEvents(client: Client) {
const eventFiles = fs.readdirSync(path.join(serverDir, eventDir))
for (const eventFile of eventFiles) {
const eventPath = path.join(serverDir, eventDir, eventFile)
const event: Event = require(eventPath)
const event: IEvent = require(eventPath)
if (!event.disabled) {
client.on(event.event, event.execute)
}

View File

@@ -1,7 +1,7 @@
import { ExtendedClient as Client } from "utils/Client"
import color from "utils/functions/colors"
import { embedColor } from "config/options"
import { Modal } from "interfaces"
import { IModal } from "interfaces"
import { Events } from "discord.js"
import path from "path"
import fs from "fs"
@@ -14,7 +14,7 @@ export default function loadModalEvents(client: Client, ft: FileType) {
for (const file of modalFiles) {
const filePath = path.join(modalPath, file)
const modal: Modal = require(filePath)
const modal: IModal = require(filePath)
if ("name" in modal && "execute" in modal) {
client.modals.set(modal.name, modal)