diff --git a/src/commands-contextmenu/congratsmessage.ts b/src/commands-contextmenu/congratsmessage.ts index 0a816fe..48c12c7 100644 --- a/src/commands-contextmenu/congratsmessage.ts +++ b/src/commands-contextmenu/congratsmessage.ts @@ -1,5 +1,5 @@ import { ContextMenuCommandBuilder, ApplicationCommandType, PermissionFlagsBits, userMention } from "discord.js" -import { ContextMenu } from "interfaces" +import { IContextMenu } from "interfaces" export = { name: "congratsmessage", @@ -37,4 +37,4 @@ export = { ephemeral: true }) } -} as ContextMenu +} as IContextMenu diff --git a/src/commands-contextmenu/resetnick.ts b/src/commands-contextmenu/resetnick.ts index 63e35e2..28a8177 100644 --- a/src/commands-contextmenu/resetnick.ts +++ b/src/commands-contextmenu/resetnick.ts @@ -1,5 +1,5 @@ import { ContextMenuCommandBuilder, ApplicationCommandType, PermissionFlagsBits } from "discord.js" -import { ContextMenu } from "interfaces" +import { IContextMenu } from "interfaces" export = { name: "resetnick", @@ -48,4 +48,4 @@ export = { ephemeral: true }) } -} as ContextMenu +} as IContextMenu diff --git a/src/commands-contextmenu/updateuser.ts b/src/commands-contextmenu/updateuser.ts index a63b435..afcffb1 100644 --- a/src/commands-contextmenu/updateuser.ts +++ b/src/commands-contextmenu/updateuser.ts @@ -1,6 +1,6 @@ import { ApplicationCommandType, ContextMenuCommandBuilder, PermissionFlagsBits, userMention } from "discord.js" import { embedColor, devMessage, hypixelGuildID } from "config/options" -import { ContextMenu } from "interfaces" +import { IContextMenu } from "interfaces" import verifySchema from "schemas/verifySchema" import { getGuild, getHeadURL, getIGN } from "utils/Hypixel" import roleManage from "utils/functions/rolesmanage" @@ -154,4 +154,4 @@ export = { }) } } -} as ContextMenu +} as IContextMenu diff --git a/src/commands/anime.ts b/src/commands/anime.ts index ac4db09..ad08231 100644 --- a/src/commands/anime.ts +++ b/src/commands/anime.ts @@ -1,5 +1,5 @@ import { SlashCommandBuilder } from "discord.js" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import search from "./anime/search" import { devMessage, embedColor } from "config/options" @@ -45,4 +45,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/ban.ts b/src/commands/ban.ts index 360b0cf..f5ed9ca 100644 --- a/src/commands/ban.ts +++ b/src/commands/ban.ts @@ -1,7 +1,7 @@ import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember, } from "discord.js" import { admin, helper } from "config/roles" import { embedColor, devMessage } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import logToChannel from "utils/functions/logtochannel" export = { @@ -136,4 +136,4 @@ export = { }] }) }, -} as Command +} as ICommand diff --git a/src/commands/botinfo.ts b/src/commands/botinfo.ts index 500ab9b..998c105 100644 --- a/src/commands/botinfo.ts +++ b/src/commands/botinfo.ts @@ -1,5 +1,5 @@ import { SlashCommandBuilder } from "discord.js" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import { embedColor, devMessage } from "config/options" import os from "os" import { execSync } from "child_process" @@ -74,4 +74,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/check.ts b/src/commands/check.ts index 78f5264..7ca3236 100644 --- a/src/commands/check.ts +++ b/src/commands/check.ts @@ -2,7 +2,7 @@ import { SlashCommandBuilder } from "discord.js" import { bwfkdr, bwstars, bwwins, swstars, swkdr, duelswins, duelswlr } from "config/reqs" import { embedColor, devMessage } from "config/options" import { hypixelLevel, bedwarsLevel, skywarsLevel, getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel" -import { Command } from "interfaces" +import { ICommand } from "interfaces" export = { name: "check", @@ -234,4 +234,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/clear.ts b/src/commands/clear.ts index 83bd861..2983a34 100644 --- a/src/commands/clear.ts +++ b/src/commands/clear.ts @@ -1,6 +1,6 @@ import { SlashCommandBuilder, PermissionFlagsBits, TextChannel, channelMention, userMention } from "discord.js" import { embedColor } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import logToChannel from "utils/functions/logtochannel" export = { @@ -77,4 +77,4 @@ export = { }) }) } -} as Command +} as ICommand diff --git a/src/commands/config.ts b/src/commands/config.ts index 7922af7..09c0b0c 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -2,7 +2,7 @@ import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js" import { embedColor } from "config/options" import settings from "schemas/settingsSchema" import mongoose from "mongoose" -import { Command } from "interfaces" +import { ICommand } from "interfaces" export = { name: "config", @@ -65,4 +65,4 @@ export = { }) } } -} as Command +} as ICommand diff --git a/src/commands/counting.ts b/src/commands/counting.ts index d42d434..b1a4996 100644 --- a/src/commands/counting.ts +++ b/src/commands/counting.ts @@ -1,6 +1,6 @@ import { PermissionFlagsBits, SlashCommandBuilder } from "discord.js" import { embedColor, devMessage } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import ban from "./counting/ban" import unban from "./counting/unban" @@ -63,4 +63,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/forceunverify.ts b/src/commands/forceunverify.ts index c50127a..446d884 100644 --- a/src/commands/forceunverify.ts +++ b/src/commands/forceunverify.ts @@ -1,7 +1,7 @@ import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js" import { embedColor, devMessage } from "config/options" import verify from "schemas/verifySchema" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import roleManage from "utils/functions/rolesmanage" import logToChannel from "utils/functions/logtochannel" import { getIGN } from "utils/Hypixel" @@ -82,4 +82,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/forceupdate.ts b/src/commands/forceupdate.ts index f623532..fccd866 100644 --- a/src/commands/forceupdate.ts +++ b/src/commands/forceupdate.ts @@ -2,7 +2,7 @@ import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } fr import { getGuild, getHeadURL, getIGN } from "utils/Hypixel" import { hypixelGuildID, embedColor, devMessage } from "config/options" import verify from "schemas/verifySchema" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import roleManage from "utils/functions/rolesmanage" import { waitingListRole } from "config/roles" @@ -160,4 +160,4 @@ export = { }) } } -} as Command +} as ICommand diff --git a/src/commands/forceverify.ts b/src/commands/forceverify.ts index d623733..81490ff 100644 --- a/src/commands/forceverify.ts +++ b/src/commands/forceverify.ts @@ -4,7 +4,7 @@ import { embedColor, hypixelGuildID, devMessage } from "config/options" import verify from "schemas/verifySchema" import mongoose from "mongoose" import roleManage from "utils/functions/rolesmanage" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import logToChannel from "utils/functions/logtochannel" export = { @@ -204,4 +204,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/guild.ts b/src/commands/guild.ts index eb843f9..7576375 100644 --- a/src/commands/guild.ts +++ b/src/commands/guild.ts @@ -1,6 +1,6 @@ import { SlashCommandBuilder } from "discord.js" import { embedColor, devMessage } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import guildMember from "./guild/member" import guildInfo from "./guild/info" import guildTop from "./guild/top" @@ -106,4 +106,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/guild/info.ts b/src/commands/guild/info.ts index b7eba2f..a039ce4 100644 --- a/src/commands/guild/info.ts +++ b/src/commands/guild/info.ts @@ -1,14 +1,14 @@ import { getUUID, getIGN, getPlayer, getGuild, guildLevel } from "utils/Hypixel" import { embedColor, devMessage } from "config/options" import { ChatInputCommandInteraction } from "discord.js" -import { GuildData } from "interfaces" +import { IGuildData } from "interfaces" export default async function guildInfo(interaction: ChatInputCommandInteraction): Promise { await interaction.deferReply() const query = interaction.options.getString("query")! const type = interaction.options.getString("type") || "ign" - let guild: GuildData | null + let guild: IGuildData | null if (type === "ign") { await interaction.editReply({ diff --git a/src/commands/guild/top.ts b/src/commands/guild/top.ts index 3851f9c..d672dab 100644 --- a/src/commands/guild/top.ts +++ b/src/commands/guild/top.ts @@ -1,7 +1,7 @@ import { getUUID, getPlayer, getGuild, getIGN } from "utils/Hypixel" import { embedColor, devMessage } from "config/options" import { ChannelType, ChatInputCommandInteraction } from "discord.js" -import { GuildData } from "interfaces" +import { IGuildData } from "interfaces" import { redis } from "utils/Illegitimate" export default async function guildTop(interaction: ChatInputCommandInteraction): Promise { @@ -10,7 +10,7 @@ export default async function guildTop(interaction: ChatInputCommandInteraction) const query = interaction.options.getString("query")! const type = interaction.options.getString("type") || "ign" let amount = interaction.options.getNumber("amount") || 10 - let guild: GuildData | null + let guild: IGuildData | null if (interaction.channel!.type === ChannelType.DM) { interaction.editReply({ diff --git a/src/commands/help.ts b/src/commands/help.ts index 6154aa1..ed10d7d 100644 --- a/src/commands/help.ts +++ b/src/commands/help.ts @@ -1,6 +1,6 @@ import { SlashCommandBuilder } from "discord.js" import { embedColor, devMessage } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" export = { name: "help", @@ -71,4 +71,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/instructions.ts b/src/commands/instructions.ts index 1cc9e11..9f0dce8 100644 --- a/src/commands/instructions.ts +++ b/src/commands/instructions.ts @@ -1,6 +1,6 @@ import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js" import { embedColor, devMessage, instructionsgif } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" export = { name: "instructions", @@ -36,4 +36,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/kick.ts b/src/commands/kick.ts index 399dfb3..2336c3d 100644 --- a/src/commands/kick.ts +++ b/src/commands/kick.ts @@ -1,7 +1,7 @@ import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js" import { admin, helper } from "config/roles" import { embedColor, devMessage } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import logToChannel from "utils/functions/logtochannel" export = { @@ -109,4 +109,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/music.ts b/src/commands/music.ts index e4b4ef8..d0fdab8 100644 --- a/src/commands/music.ts +++ b/src/commands/music.ts @@ -1,5 +1,5 @@ import { PermissionFlagsBits, SlashCommandBuilder } from "discord.js" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import play from "./music/play" import leave from "./music/leave" import queue from "./music/queue" @@ -114,4 +114,4 @@ export = { return } } -} as Command \ No newline at end of file +} as ICommand \ No newline at end of file diff --git a/src/commands/ping.ts b/src/commands/ping.ts index a203493..cd022f6 100644 --- a/src/commands/ping.ts +++ b/src/commands/ping.ts @@ -1,6 +1,6 @@ import { SlashCommandBuilder } from "discord.js" import { embedColor, devMessage } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" export = { name: "ping", @@ -27,4 +27,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/pp.ts b/src/commands/pp.ts index 05bc3d7..b949f60 100644 --- a/src/commands/pp.ts +++ b/src/commands/pp.ts @@ -1,6 +1,6 @@ import { SlashCommandBuilder, User } from "discord.js" import { embedColor } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import env from "utils/Env" export = { @@ -38,4 +38,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/remove.ts b/src/commands/remove.ts index 4bd910a..4767d8b 100644 --- a/src/commands/remove.ts +++ b/src/commands/remove.ts @@ -1,7 +1,7 @@ import { SlashCommandBuilder, PermissionFlagsBits, userMention } from "discord.js" import { embedColor, devMessage } from "config/options" import waitinglistSchema from "schemas/waitinglistSchema" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import logToChannel from "utils/functions/logtochannel" export = { @@ -85,4 +85,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/reqs.ts b/src/commands/reqs.ts index 0c9a25b..c9a4f9f 100644 --- a/src/commands/reqs.ts +++ b/src/commands/reqs.ts @@ -1,7 +1,7 @@ import { SlashCommandBuilder } from "discord.js" import { embedColor, devMessage } from "config/options" import { bwfkdr, bwstars, bwwins, swstars, swkdr, duelswins, duelswlr } from "config/reqs" -import { Command } from "interfaces" +import { ICommand } from "interfaces" export = { name: "reqs", @@ -48,4 +48,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/send.ts b/src/commands/send.ts index d096ad2..efe55ac 100644 --- a/src/commands/send.ts +++ b/src/commands/send.ts @@ -1,6 +1,6 @@ import { SlashCommandBuilder, PermissionFlagsBits, ChannelType, TextChannel } from "discord.js" import { embedColor, devMessage } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" export = { name: "send", @@ -58,4 +58,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/setnick.ts b/src/commands/setnick.ts index 33ef2db..538191f 100644 --- a/src/commands/setnick.ts +++ b/src/commands/setnick.ts @@ -1,6 +1,6 @@ import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js" import { embedColor, devMessage } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import logToChannel from "utils/functions/logtochannel" export = { @@ -77,4 +77,4 @@ export = { ephemeral: true }) } -} as Command +} as ICommand diff --git a/src/commands/setup.ts b/src/commands/setup.ts index 97e6d3e..8e2073d 100644 --- a/src/commands/setup.ts +++ b/src/commands/setup.ts @@ -1,6 +1,6 @@ import { SlashCommandBuilder, PermissionFlagsBits, ButtonBuilder, ActionRowBuilder, ButtonStyle, ChannelType, TextChannel } from "discord.js" import { embedColor, devMessage } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" export = { name: "setup", @@ -153,4 +153,4 @@ export = { ephemeral: true }) } -} as Command +} as ICommand diff --git a/src/commands/slowmode.ts b/src/commands/slowmode.ts index 1401370..a478517 100644 --- a/src/commands/slowmode.ts +++ b/src/commands/slowmode.ts @@ -1,6 +1,6 @@ import { SlashCommandBuilder, PermissionFlagsBits, ChannelType, TextChannel, channelMention, userMention } from "discord.js" import { embedColor, devMessage } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import logToChannel from "utils/functions/logtochannel" export = { @@ -83,4 +83,4 @@ export = { }) await channel.setRateLimitPerUser(seconds) } -} as Command +} as ICommand diff --git a/src/commands/snipe.ts b/src/commands/snipe.ts index 40b94e7..19aeb85 100644 --- a/src/commands/snipe.ts +++ b/src/commands/snipe.ts @@ -1,6 +1,6 @@ import { GuildMember, SlashCommandBuilder } from "discord.js" import snipeCacheSchema from "schemas/snipeCacheSchema" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import { embedColor } from "config/options" import { SnipeCache } from "typings" @@ -71,4 +71,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/staff.ts b/src/commands/staff.ts index 4f3c621..5625bde 100644 --- a/src/commands/staff.ts +++ b/src/commands/staff.ts @@ -1,6 +1,6 @@ import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js" import { embedColor, devMessage } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import help from "./staff/help" import beast from "./staff/beast" import updateAll from "./staff/updateall" @@ -90,4 +90,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/staff/removeguildroles.ts b/src/commands/staff/removeguildroles.ts index d693256..250aa75 100644 --- a/src/commands/staff/removeguildroles.ts +++ b/src/commands/staff/removeguildroles.ts @@ -1,7 +1,7 @@ import { embedColor, hypixelGuildID } from "config/options" import { ChatInputCommandInteraction, GuildMember } from "discord.js" import verify from "schemas/verifySchema" -import { GuildData } from "interfaces" +import { IGuildData } from "interfaces" import env from "utils/Env" import { getGuild } from "utils/Hypixel" import roleManage from "utils/functions/rolesmanage" @@ -30,7 +30,7 @@ export default async function removeGuildRoles(interaction: ChatInputCommandInte }) ) - const guildData = (await getGuild(hypixelGuildID, "id")) as GuildData + const guildData = (await getGuild(hypixelGuildID, "id")) as IGuildData const hypixelGuildMembers = guildData.members.map(gmember => gmember.uuid) diff --git a/src/commands/staff/updateall.ts b/src/commands/staff/updateall.ts index 9fd822f..b531df6 100644 --- a/src/commands/staff/updateall.ts +++ b/src/commands/staff/updateall.ts @@ -6,7 +6,7 @@ import roleManage from "utils/functions/rolesmanage" import { ChatInputCommandInteraction, GuildMember } from "discord.js" import env from "utils/Env" import { getGuild } from "utils/Hypixel" -import { GuildData } from "interfaces" +import { IGuildData } from "interfaces" export default async function updateAll(interaction: ChatInputCommandInteraction): Promise { await interaction.deferReply() @@ -32,7 +32,7 @@ export default async function updateAll(interaction: ChatInputCommandInteraction }) ) - const guildData = (await getGuild(hypixelGuildID, "id")) as GuildData + const guildData = (await getGuild(hypixelGuildID, "id")) as IGuildData const hypixelGuildMembers = guildData.members.map(gmember => { return { diff --git a/src/commands/timeout.ts b/src/commands/timeout.ts index 487b947..dad6e3d 100644 --- a/src/commands/timeout.ts +++ b/src/commands/timeout.ts @@ -1,6 +1,6 @@ import { SlashCommandBuilder, PermissionFlagsBits, userMention, ChatInputCommandInteraction, GuildMember } from "discord.js" import { embedColor, devMessage } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import ms from "ms" import logToChannel from "utils/functions/logtochannel" @@ -161,4 +161,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/unban.ts b/src/commands/unban.ts index 87420af..67135d1 100644 --- a/src/commands/unban.ts +++ b/src/commands/unban.ts @@ -1,6 +1,6 @@ import { SlashCommandBuilder, PermissionFlagsBits, userMention, User } from "discord.js" import { embedColor, devMessage } from "config/options" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import logToChannel from "utils/functions/logtochannel" export = { @@ -101,4 +101,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/update.ts b/src/commands/update.ts index 2b97eb2..b3bfa13 100644 --- a/src/commands/update.ts +++ b/src/commands/update.ts @@ -3,7 +3,7 @@ import { getGuild, getIGN, getHeadURL } from "utils/Hypixel" import verify from "schemas/verifySchema" import { embedColor, hypixelGuildID, devMessage } from "config/options" import roleManage from "utils/functions/rolesmanage" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import { waitingListRole } from "config/roles" export = { @@ -143,4 +143,4 @@ export = { }) } } -} as Command +} as ICommand diff --git a/src/commands/uuid.ts b/src/commands/uuid.ts index c9c9349..2eb4190 100644 --- a/src/commands/uuid.ts +++ b/src/commands/uuid.ts @@ -1,7 +1,7 @@ import { SlashCommandBuilder } from "discord.js" import { embedColor, devMessage } from "config/options" import { getUUID, getIGN, getHeadURL, formatUuid } from "utils/Hypixel" -import { Command } from "interfaces" +import { ICommand } from "interfaces" export = { name: "uuid", @@ -58,4 +58,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/verify.ts b/src/commands/verify.ts index 2f493f2..7256747 100644 --- a/src/commands/verify.ts +++ b/src/commands/verify.ts @@ -3,10 +3,10 @@ import { getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel" import { embedColor, hypixelGuildID, devMessage } from "config/options" import mongoose from "mongoose" import roleManage from "utils/functions/rolesmanage" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import verify from "schemas/verifySchema" -import { PlayerData } from "interfaces" -import { GuildData } from "interfaces" +import { IPlayerData } from "interfaces" +import { IGuildData } from "interfaces" export = { name: "verify", @@ -75,7 +75,7 @@ export = { }) const head = await getHeadURL(ign) - const player = (await getPlayer(uuid)) as PlayerData + const player = (await getPlayer(uuid)) as IPlayerData if (!player) { interaction.editReply({ embeds: [{ @@ -130,7 +130,7 @@ export = { }] }) - const guild = (await getGuild(uuid)) as GuildData | null + const guild = (await getGuild(uuid)) as IGuildData | null let guildID: string | null if (!guild) { guildID = null @@ -198,4 +198,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/whoami.ts b/src/commands/whoami.ts index 9e49e55..7f724e1 100644 --- a/src/commands/whoami.ts +++ b/src/commands/whoami.ts @@ -1,5 +1,5 @@ import { SlashCommandBuilder, userMention } from "discord.js" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import { embedColor, devMessage } from "config/options" import verify from "schemas/verifySchema" import { getIGN, getHeadURL } from "utils/Hypixel" @@ -50,4 +50,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/commands/whois.ts b/src/commands/whois.ts index dde2c10..8002a56 100644 --- a/src/commands/whois.ts +++ b/src/commands/whois.ts @@ -2,7 +2,7 @@ import { SlashCommandBuilder, PermissionFlagsBits, userMention } from "discord.j import { getIGN, getHeadURL } from "utils/Hypixel" import { embedColor, devMessage } from "config/options" import verify from "schemas/verifySchema" -import { Command } from "interfaces" +import { ICommand } from "interfaces" export = { name: "whois", @@ -51,4 +51,4 @@ export = { }] }) } -} as Command +} as ICommand diff --git a/src/components/autocomplete/music.ts b/src/components/autocomplete/music.ts index bbdd851..1d76160 100644 --- a/src/components/autocomplete/music.ts +++ b/src/components/autocomplete/music.ts @@ -1,5 +1,5 @@ import { QueryType, useMainPlayer } from "discord-player" -import { Autocomplete } from "interfaces" +import { IAutocomplete } from "interfaces" export = { name: "music", @@ -29,4 +29,4 @@ export = { await interaction.respond(results.slice(0, 25)).catch() } -} as Autocomplete \ No newline at end of file +} as IAutocomplete \ No newline at end of file diff --git a/src/components/autocomplete/unban.ts b/src/components/autocomplete/unban.ts index 192f834..3df7003 100644 --- a/src/components/autocomplete/unban.ts +++ b/src/components/autocomplete/unban.ts @@ -1,4 +1,4 @@ -import { Autocomplete } from "interfaces" +import { IAutocomplete } from "interfaces" export = { name: "unban", @@ -28,4 +28,4 @@ export = { console.log(err) }) } -} as Autocomplete +} as IAutocomplete diff --git a/src/components/buttons/checkstats.ts b/src/components/buttons/checkstats.ts index 64a2961..6946712 100644 --- a/src/components/buttons/checkstats.ts +++ b/src/components/buttons/checkstats.ts @@ -2,7 +2,7 @@ import { embedColor, devMessage } from "config/options" import guildapp from "schemas/guildAppSchema" import { bwfkdr, bwstars, bwwins, swstars, swkdr, duelswins, duelswlr } from "config/reqs" import { hypixelLevel, bedwarsLevel, skywarsLevel, getPlayer, getGuild, getHeadURL } from "utils/Hypixel" -import { Button } from "interfaces" +import { IButton } from "interfaces" export = { name: "checkstats", @@ -176,4 +176,4 @@ export = { }] }) } -} as Button +} as IButton diff --git a/src/components/buttons/guildapplicationaccept.ts b/src/components/buttons/guildapplicationaccept.ts index 856aaac..b8b05ed 100644 --- a/src/components/buttons/guildapplicationaccept.ts +++ b/src/components/buttons/guildapplicationaccept.ts @@ -5,7 +5,7 @@ import mongoose from "mongoose" import guildapp from "schemas/guildAppSchema" import waitingList from "schemas/waitinglistSchema" import { waitingListRole } from "config/roles" -import { Button } from "interfaces" +import { IButton } from "interfaces" import { getGuild } from "utils/Hypixel" export = { @@ -136,4 +136,4 @@ export = { ) } } -} as Button +} as IButton diff --git a/src/components/buttons/guildapplicationdeny.ts b/src/components/buttons/guildapplicationdeny.ts index 5d55c21..ee6b10e 100644 --- a/src/components/buttons/guildapplicationdeny.ts +++ b/src/components/buttons/guildapplicationdeny.ts @@ -1,5 +1,5 @@ import { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } from "discord.js" -import { Button } from "interfaces" +import { IButton } from "interfaces" export = { name: "guildapplicationdeny", @@ -21,4 +21,4 @@ export = { ) await interaction.showModal(modal) } -} as Button +} as IButton diff --git a/src/components/buttons/guildapply.ts b/src/components/buttons/guildapply.ts index ec3e7b3..2905df4 100644 --- a/src/components/buttons/guildapply.ts +++ b/src/components/buttons/guildapply.ts @@ -6,7 +6,7 @@ import { guildRole } from "config/roles" import { getUUID } from "utils/Hypixel" import mongoose from "mongoose" import guildapp from "schemas/guildAppSchema" -import { Button } from "interfaces" +import { IButton } from "interfaces" export = { name: "guildapply", @@ -507,4 +507,4 @@ export = { ] }) } -} as Button +} as IButton diff --git a/src/components/buttons/guildinactivitylog.ts b/src/components/buttons/guildinactivitylog.ts index 12c8a96..794d7b7 100644 --- a/src/components/buttons/guildinactivitylog.ts +++ b/src/components/buttons/guildinactivitylog.ts @@ -3,7 +3,7 @@ import { gm, manager, moderator, beast, member, guildStaff, guildRole } from "co import { ignM, smallM, largeM } from "config/limitmessages" import { inactivity } from "config/questions" import { embedColor, inactivityLogChannel } from "config/options" -import { Button } from "interfaces" +import { IButton } from "interfaces" import { getIGN } from "utils/Hypixel" const guildRoles = [gm, manager, moderator, beast, member, guildStaff, guildRole] @@ -281,4 +281,4 @@ export = { ] }) } -} as Button +} as IButton diff --git a/src/components/buttons/inactiveapplicationaccept.ts b/src/components/buttons/inactiveapplicationaccept.ts index adb5138..51efe22 100644 --- a/src/components/buttons/inactiveapplicationaccept.ts +++ b/src/components/buttons/inactiveapplicationaccept.ts @@ -1,4 +1,4 @@ -import { Button } from "interfaces" +import { IButton } from "interfaces" export = { name: "inactiveapplicationaccept", @@ -10,4 +10,4 @@ export = { ephemeral: true }) } -} as Button +} as IButton diff --git a/src/components/buttons/inactiveapplicationdeny.ts b/src/components/buttons/inactiveapplicationdeny.ts index d48cfe4..c294f67 100644 --- a/src/components/buttons/inactiveapplicationdeny.ts +++ b/src/components/buttons/inactiveapplicationdeny.ts @@ -1,4 +1,4 @@ -import { Button } from "interfaces" +import { IButton } from "interfaces" export = { name: "inactiveapplicationdeny", @@ -10,4 +10,4 @@ export = { ephemeral: true }) } -} as Button +} as IButton diff --git a/src/components/buttons/staffapplicationaccept.ts b/src/components/buttons/staffapplicationaccept.ts index b0cb654..7691550 100644 --- a/src/components/buttons/staffapplicationaccept.ts +++ b/src/components/buttons/staffapplicationaccept.ts @@ -1,7 +1,7 @@ import { ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js" import { embedColor } from "config/options" import staffapp from "schemas/staffAppSchema" -import { Button } from "interfaces" +import { IButton } from "interfaces" export = { name: "staffapplicationaccept", @@ -60,4 +60,4 @@ export = { }] }) } -} as Button +} as IButton diff --git a/src/components/buttons/staffapplicationdeny.ts b/src/components/buttons/staffapplicationdeny.ts index 6b3be04..97ccfe6 100644 --- a/src/components/buttons/staffapplicationdeny.ts +++ b/src/components/buttons/staffapplicationdeny.ts @@ -1,5 +1,5 @@ import { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } from "discord.js" -import { Button } from "interfaces" +import { IButton } from "interfaces" export = { name: "staffapplicationdeny", @@ -15,10 +15,10 @@ export = { .setLabel("Deny Reason") .setCustomId("staffdenyreason") .setStyle(TextInputStyle.Paragraph) - .setPlaceholder( "Enter a reason for denying the application") + .setPlaceholder("Enter a reason for denying the application") .setRequired(false) ) ) await interaction.showModal(modal) } -} as Button +} as IButton diff --git a/src/components/buttons/staffapply.ts b/src/components/buttons/staffapply.ts index f950294..eed22a4 100644 --- a/src/components/buttons/staffapply.ts +++ b/src/components/buttons/staffapply.ts @@ -7,7 +7,7 @@ import mongoose from "mongoose" import staffapp from "schemas/staffAppSchema" import settings from "schemas/settingsSchema" import { getUUID } from "utils/Hypixel" -import { Button } from "interfaces" +import { IButton } from "interfaces" import env from "utils/Env" export = { @@ -441,4 +441,4 @@ export = { }) } } -} as Button +} as IButton diff --git a/src/components/buttons/verify.ts b/src/components/buttons/verify.ts index 0e7dd19..593bf2d 100644 --- a/src/components/buttons/verify.ts +++ b/src/components/buttons/verify.ts @@ -1,5 +1,5 @@ import { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } from "discord.js" -import { Button } from "interfaces" +import { IButton } from "interfaces" export = { name: "verify", @@ -23,4 +23,4 @@ export = { ) await interaction.showModal(modal) } -} as Button +} as IButton diff --git a/src/components/buttons/waitingListUpdate.ts b/src/components/buttons/waitingListUpdate.ts index a646e8a..85d5aeb 100644 --- a/src/components/buttons/waitingListUpdate.ts +++ b/src/components/buttons/waitingListUpdate.ts @@ -1,7 +1,7 @@ import waitinglist from "schemas/waitinglistSchema" import { getGuild } from "utils/Hypixel" import { hypixelGuildID } from "config/options" -import { Button } from "interfaces" +import { IButton } from "interfaces" export = { name: "waitinglistupdate", @@ -53,4 +53,4 @@ export = { await interaction.editReply("Updated the waiting list") } -} as Button +} as IButton diff --git a/src/components/modals/denyreasonbox.ts b/src/components/modals/denyreasonbox.ts index 676cdef..620a5e2 100644 --- a/src/components/modals/denyreasonbox.ts +++ b/src/components/modals/denyreasonbox.ts @@ -1,7 +1,7 @@ import { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, Message, GuildMember } from "discord.js" import { embedColor } from "config/options" import guildapp from "schemas/guildAppSchema" -import { Modal } from "interfaces" +import { IModal } from "interfaces" export = { name: "denyreasonbox", @@ -84,4 +84,4 @@ export = { embeds: responseEmbeds }) } -} as Modal +} as IModal diff --git a/src/components/modals/staffdenyreasonbox.ts b/src/components/modals/staffdenyreasonbox.ts index f4c9a7f..1a1ddff 100644 --- a/src/components/modals/staffdenyreasonbox.ts +++ b/src/components/modals/staffdenyreasonbox.ts @@ -1,7 +1,7 @@ import { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js" import { embedColor } from "config/options" import staffapp from "schemas/staffAppSchema" -import { Modal } from "interfaces" +import { IModal } from "interfaces" export = { name: "staffdenyreasonbox", @@ -60,4 +60,4 @@ export = { }] }) } -} as Modal +} as IModal diff --git a/src/components/modals/verifyModal.ts b/src/components/modals/verifyModal.ts index c57a912..4526a5f 100644 --- a/src/components/modals/verifyModal.ts +++ b/src/components/modals/verifyModal.ts @@ -3,7 +3,7 @@ import { embedColor, hypixelGuildID, devMessage } from "config/options" import verify from "schemas/verifySchema" import mongoose from "mongoose" import { gm, manager, moderator, beast, elite, member, guildRole, guildStaff, defaultMember } from "config/roles" -import { Modal } from "interfaces" +import { IModal } from "interfaces" import { GuildMember } from "discord.js" export = { @@ -145,4 +145,4 @@ export = { }) } } -} as Modal +} as IModal diff --git a/src/events/cron/weeklyGexp.ts b/src/events/cron/weeklyGexp.ts index 1877633..dc37477 100644 --- a/src/events/cron/weeklyGexp.ts +++ b/src/events/cron/weeklyGexp.ts @@ -1,7 +1,7 @@ import { hypixelGuildID, guildLogChannel, embedColor, devMessage } from "config/options" import color from "utils/functions/colors" import { getGuild, getIGN } from "utils/Hypixel" -import { Cron, GuildData } from "interfaces" +import { ICron, IGuildData } from "interfaces" import { client } from "utils/Illegitimate" import { TextChannel } from "discord.js" @@ -20,7 +20,7 @@ async function guildWeekly() { }] }) - const guild = (await getGuild(hypixelGuildID, "id")) as GuildData + const guild = (await getGuild(hypixelGuildID, "id")) as IGuildData const guildMembersList: string[] = [] const topWeeklyMembers: { name: string; value: string; inline: boolean }[] = [] @@ -99,4 +99,4 @@ export = { onComplete: null, start: true, timeZone: "Europe/Zagreb" -} as Cron +} as ICron diff --git a/src/events/server/guildMemberAdd/logNewJoins.ts b/src/events/server/guildMemberAdd/logNewJoins.ts index efc989e..8bf02c0 100644 --- a/src/events/server/guildMemberAdd/logNewJoins.ts +++ b/src/events/server/guildMemberAdd/logNewJoins.ts @@ -1,6 +1,6 @@ import { GuildMember, userMention } from "discord.js" import { embedColor } from "config/options" -import { Event } from "interfaces" +import { IEvent } from "interfaces" import logToChannel from "utils/functions/logtochannel" export = { @@ -27,4 +27,4 @@ export = { }] }) } -} as Event +} as IEvent diff --git a/src/events/server/interactions/logBtnsCmds.ts b/src/events/server/interactions/logBtnsCmds.ts index c00df06..848731b 100644 --- a/src/events/server/interactions/logBtnsCmds.ts +++ b/src/events/server/interactions/logBtnsCmds.ts @@ -1,6 +1,6 @@ import { ChatInputCommandInteraction, ButtonInteraction } from "discord.js" import color from "utils/functions/colors" -import { Event } from "interfaces" +import { IEvent } from "interfaces" export = { name: "logBtnsCmds", @@ -51,4 +51,4 @@ export = { return } } -} as Event +} as IEvent diff --git a/src/events/server/messages/eval.ts b/src/events/server/messages/eval.ts index 3e0ed27..b1a001d 100644 --- a/src/events/server/messages/eval.ts +++ b/src/events/server/messages/eval.ts @@ -1,5 +1,5 @@ import { Message } from "discord.js" -import { Event } from "interfaces" +import { IEvent } from "interfaces" import env from "utils/Env" export = { @@ -31,4 +31,4 @@ export = { }) } } -} as Event +} as IEvent diff --git a/src/events/server/messages/react.ts b/src/events/server/messages/react.ts index 664c20b..eeb8d62 100644 --- a/src/events/server/messages/react.ts +++ b/src/events/server/messages/react.ts @@ -1,4 +1,4 @@ -import { Event } from "interfaces" +import { IEvent } from "interfaces" import { Message } from "discord.js" export = { @@ -11,4 +11,4 @@ export = { message.react("Woot:734345936347725885") } } -} as Event +} as IEvent diff --git a/src/events/server/messages/snipecache.ts b/src/events/server/messages/snipecache.ts index ae7a9f4..8b5a2c7 100644 --- a/src/events/server/messages/snipecache.ts +++ b/src/events/server/messages/snipecache.ts @@ -1,5 +1,5 @@ import { ChannelType, Message } from "discord.js" -import { Event } from "interfaces" +import { IEvent } from "interfaces" import snipeCacheSchema from "schemas/snipeCacheSchema" import mongoose from "mongoose" import { SnipeCache } from "typings" @@ -32,4 +32,4 @@ export = { await snipeCache.save() } -} as Event +} as IEvent diff --git a/src/events/server/ready/consolelog.ts b/src/events/server/ready/consolelog.ts index b7108e9..7d0105e 100644 --- a/src/events/server/ready/consolelog.ts +++ b/src/events/server/ready/consolelog.ts @@ -1,4 +1,4 @@ -import { Event } from "interfaces" +import { IEvent } from "interfaces" import { ExtendedClient as Client } from "utils/Client" import color from "utils/functions/colors" @@ -10,4 +10,4 @@ export = { execute(client: Client) { console.log(color("Logged in as " + client.user!.tag + "!", "green")) } -} as Event +} as IEvent diff --git a/src/events/server/ready/sendOnlineMessage.ts b/src/events/server/ready/sendOnlineMessage.ts index dc2bc16..217cf15 100644 --- a/src/events/server/ready/sendOnlineMessage.ts +++ b/src/events/server/ready/sendOnlineMessage.ts @@ -1,5 +1,5 @@ import logToChannel from "utils/functions/logtochannel" -import { Event } from "interfaces" +import { IEvent } from "interfaces" import { embedColor } from "config/options" export = { @@ -17,4 +17,4 @@ export = { }] }) } -} as Event +} as IEvent diff --git a/src/events/server/ready/status.ts b/src/events/server/ready/status.ts index bb24956..baa4b65 100644 --- a/src/events/server/ready/status.ts +++ b/src/events/server/ready/status.ts @@ -1,5 +1,5 @@ import statuses from "config/statuses" -import { Event } from "interfaces" +import { IEvent } from "interfaces" import { ExtendedClient as Client } from "utils/Client" export = { @@ -27,4 +27,4 @@ export = { user.setStatus("dnd") } -} as Event +} as IEvent diff --git a/src/events/server/voiceStateUpdate/vcJoinLeave.ts b/src/events/server/voiceStateUpdate/vcJoinLeave.ts index 52e5f9e..7d72f3e 100644 --- a/src/events/server/voiceStateUpdate/vcJoinLeave.ts +++ b/src/events/server/voiceStateUpdate/vcJoinLeave.ts @@ -1,6 +1,6 @@ import { userMention, channelMention, VoiceState } from "discord.js" import { embedColor } from "config/options" -import { Event } from "interfaces" +import { IEvent } from "interfaces" import logToChannel from "utils/functions/logtochannel" export = { @@ -58,4 +58,4 @@ export = { }) } } -} as Event +} as IEvent diff --git a/src/utils/Autodeploy.ts b/src/utils/Autodeploy.ts index 4dacb1b..f7f0f0a 100644 --- a/src/utils/Autodeploy.ts +++ b/src/utils/Autodeploy.ts @@ -1,7 +1,7 @@ import fs from "fs" import { ExtendedClient } from "./Client" import env from "./Env" -import { Command } from "interfaces" +import { ICommand } from "interfaces" import { RESTPostAPIChatInputApplicationCommandsJSONBody } from "discord.js" import color from "./functions/colors" type FileType = "js" | "ts" @@ -20,7 +20,7 @@ export default async function autoDeployCommands(fileType: FileType, client: Ext } for (const file of commandFiles) { - const command: Command = require(`../commands/${file}`) + const command: ICommand = require(`../commands/${file}`) if (command.dev) { commands.push(command.data.toJSON()) } diff --git a/src/utils/Client.ts b/src/utils/Client.ts index 39c5cbf..b3f02b4 100644 --- a/src/utils/Client.ts +++ b/src/utils/Client.ts @@ -1,15 +1,15 @@ import { Client, Collection, GatewayIntentBits, Partials } from "discord.js" import color from "./functions/colors" -import { Command, ContextMenu, Button, Modal, Autocomplete } from "interfaces" +import { ICommand, IContextMenu, IButton, IModal, IAutocomplete } from "interfaces" import env from "./Env" import autoDeployCommands from "./Autodeploy" export class ExtendedClient extends Client { - commands: Collection = new Collection() - contextmenus: Collection = new Collection() - buttons: Collection = new Collection() - modals: Collection = new Collection() - autocomplete: Collection = new Collection() + commands: Collection = new Collection() + contextmenus: Collection = new Collection() + buttons: Collection = new Collection() + modals: Collection = new Collection() + autocomplete: Collection = new Collection() constructor() { super({ diff --git a/src/utils/Env.ts b/src/utils/Env.ts index 445cfbf..73d48c3 100644 --- a/src/utils/Env.ts +++ b/src/utils/Env.ts @@ -1,7 +1,7 @@ -import { Env } from "interfaces" +import { IEnv } from "interfaces" import "dotenv/config" -const env: Env = { +const env: IEnv = { prod: { token: process.env.TOKEN, mongoURI: process.env.MONGOURI, diff --git a/src/utils/Events/autocomplete.ts b/src/utils/Events/autocomplete.ts index 11b953a..a554c19 100644 --- a/src/utils/Events/autocomplete.ts +++ b/src/utils/Events/autocomplete.ts @@ -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) diff --git a/src/utils/Events/button.ts b/src/utils/Events/button.ts index 60cd540..f9f0702 100644 --- a/src/utils/Events/button.ts +++ b/src/utils/Events/button.ts @@ -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) diff --git a/src/utils/Events/command.ts b/src/utils/Events/command.ts index 92c0cf3..161cb0c 100644 --- a/src/utils/Events/command.ts +++ b/src/utils/Events/command.ts @@ -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) diff --git a/src/utils/Events/contextmenu.ts b/src/utils/Events/contextmenu.ts index 1da23fc..6ef4d2e 100644 --- a/src/utils/Events/contextmenu.ts +++ b/src/utils/Events/contextmenu.ts @@ -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) diff --git a/src/utils/Events/cron.ts b/src/utils/Events/cron.ts index 313d74a..c0b262d 100644 --- a/src/utils/Events/cron.ts +++ b/src/utils/Events/cron.ts @@ -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 + " " + diff --git a/src/utils/Events/events.ts b/src/utils/Events/events.ts index db0b9c1..2837bf0 100644 --- a/src/utils/Events/events.ts +++ b/src/utils/Events/events.ts @@ -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) } diff --git a/src/utils/Events/modal.ts b/src/utils/Events/modal.ts index e8f1d90..2b0e764 100644 --- a/src/utils/Events/modal.ts +++ b/src/utils/Events/modal.ts @@ -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) diff --git a/src/utils/Hypixel/account.ts b/src/utils/Hypixel/account.ts index 3140083..38ed5f4 100644 --- a/src/utils/Hypixel/account.ts +++ b/src/utils/Hypixel/account.ts @@ -1,7 +1,7 @@ import fetch from "axios" import env from "utils/Env" -import { Player, PlayerData } from "interfaces" -import { Guild, GuildData } from "interfaces" +import { IPlayer, IPlayerData } from "interfaces" +import { IGuild, IGuildData } from "interfaces" const apikey = env.prod.hypixelapikey const mojang = "https://api.mojang.com/users/profiles/minecraft/" const mojanguuid = "https://sessionserver.mojang.com/session/minecraft/profile/" @@ -44,8 +44,8 @@ async function getIGN(uuid: string): Promise { } } -async function getPlayer(uuid: string): Promise { - const playerReq: Player = await fetch(hypixel, { +async function getPlayer(uuid: string): Promise { + const playerReq: IPlayer = await fetch(hypixel, { params: { uuid: uuid }, @@ -61,10 +61,10 @@ async function getPlayer(uuid: string): Promise { return playerReq.data.player } -async function getGuild(query: string, type?: GuildQueryType): Promise { +async function getGuild(query: string, type?: GuildQueryType): Promise { const reqType = type ? type : "player" - const guildReq: Guild = await fetch(guild, { + const guildReq: IGuild = await fetch(guild, { params: { [reqType]: query },