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,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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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<void> {
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({

View File

@@ -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<void> {
@@ -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({

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
} as ICommand

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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<void> {
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 {

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
} as IAutocomplete

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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())
}

View File

@@ -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<string, Command> = new Collection()
contextmenus: Collection<string, ContextMenu> = new Collection()
buttons: Collection<string, Button> = new Collection()
modals: Collection<string, Modal> = new Collection()
autocomplete: Collection<string, Autocomplete> = new Collection()
commands: Collection<string, ICommand> = new Collection()
contextmenus: Collection<string, IContextMenu> = new Collection()
buttons: Collection<string, IButton> = new Collection()
modals: Collection<string, IModal> = new Collection()
autocomplete: Collection<string, IAutocomplete> = new Collection()
constructor() {
super({

View File

@@ -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,

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)

View File

@@ -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<string | null> {
}
}
async function getPlayer(uuid: string): Promise<PlayerData | null> {
const playerReq: Player = await fetch(hypixel, {
async function getPlayer(uuid: string): Promise<IPlayerData | null> {
const playerReq: IPlayer = await fetch(hypixel, {
params: {
uuid: uuid
},
@@ -61,10 +61,10 @@ async function getPlayer(uuid: string): Promise<PlayerData | null> {
return playerReq.data.player
}
async function getGuild(query: string, type?: GuildQueryType): Promise<GuildData | null> {
async function getGuild(query: string, type?: GuildQueryType): Promise<IGuildData | null> {
const reqType = type ? type : "player"
const guildReq: Guild = await fetch(guild, {
const guildReq: IGuild = await fetch(guild, {
params: {
[reqType]: query
},