Merge branch 'dev' into 'main'
Updated type system See merge request illegitimate/illegitimate-bot!323
This commit is contained in:
1
.swcrc
1
.swcrc
@@ -16,7 +16,6 @@
|
||||
"paths": {
|
||||
"~/utils/*": ["src/utils/*"],
|
||||
"~/config/*": ["src/config/*"],
|
||||
"~/interfaces": ["src/interfaces/index"],
|
||||
"~/typings": ["src/typings/index"]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApplicationCommandType, ContextMenuCommandBuilder, InteractionContextType, PermissionFlagsBits, userMention } from "discord.js"
|
||||
import { IContextMenu } from "~/interfaces"
|
||||
import { IContextMenu } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "congratsmessage",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApplicationCommandType, ContextMenuCommandBuilder, InteractionContextType, PermissionFlagsBits } from "discord.js"
|
||||
import { IContextMenu } from "~/interfaces"
|
||||
import { IContextMenu } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "resetnick",
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ApplicationCommandType, ContextMenuCommandBuilder, InteractionContextTy
|
||||
import { getVerify } from "src/drizzle/functions.js"
|
||||
import { devMessage, embedColor, hypixelGuildID } from "~/config/options.js"
|
||||
import { waitingListRole } from "~/config/roles.js"
|
||||
import { IContextMenu } from "~/interfaces"
|
||||
import { IContextMenu } from "~/typings"
|
||||
import getGuildRank from "~/utils/Functions/guildrank.js"
|
||||
import roleManage from "~/utils/Functions/rolesmanage.js"
|
||||
import { getGuild, getHeadURL, getIGN } from "~/utils/Hypixel.js"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { anilist } from "anilist"
|
||||
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "anime",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { admin, helper } from "~/config/roles.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { createRequire } from "node:module"
|
||||
import os from "os"
|
||||
import prettyMs from "pretty-ms"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
|
||||
const require = createRequire(import.meta.url)
|
||||
const { dependencies, devDependencies } = require("../../package.json")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { bwfkdr, bwstars, bwwins, duelswins, duelswlr, swkdr, swstars } from "~/config/reqs.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import { bedwarsLevel, getGuild, getHeadURL, getPlayer, getUUID, hypixelLevel, skywarsLevel } from "~/utils/Hypixel.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { channelMention, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, TextChannel, userMention } from "discord.js"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
||||
import { addSetting, getSetting, updateSetting } from "src/drizzle/functions.js"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "config",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import ban from "./counting/ban.js"
|
||||
import unban from "./counting/unban.js"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||
import { getVerify } from "src/drizzle/functions.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import { getHeadURL, getIGN, getUUID } from "~/utils/Hypixel.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||
import { getVerify, removeVerify } from "src/drizzle/functions.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
import roleManage from "~/utils/Functions/rolesmanage.js"
|
||||
import { getIGN } from "~/utils/Hypixel.js"
|
||||
|
||||
@@ -2,7 +2,7 @@ import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandB
|
||||
import { getVerify } from "src/drizzle/functions.js"
|
||||
import { devMessage, embedColor, hypixelGuildID } from "~/config/options.js"
|
||||
import { waitingListRole } from "~/config/roles.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import getGuildRank from "~/utils/Functions/guildrank.js"
|
||||
import roleManage from "~/utils/Functions/rolesmanage.js"
|
||||
import { getGuild, getHeadURL, getIGN } from "~/utils/Hypixel.js"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||
import { addVerify, getVerify } from "src/drizzle/functions.js"
|
||||
import { devMessage, embedColor, hypixelGuildID } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import getGuildRank from "~/utils/Functions/guildrank.js"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
import roleManage from "~/utils/Functions/rolesmanage.js"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import guildInfo from "./guild/info.js"
|
||||
import guildMember from "./guild/member.js"
|
||||
import guildTop from "./guild/top.js"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ChatInputCommandInteraction } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { IGuildData } from "~/interfaces"
|
||||
import { IGuildData } from "~/typings"
|
||||
import { dateTimeFormatter, numberFormatter } from "~/utils/Functions/intlFormaters.js"
|
||||
import { getGuild, getIGN, getPlayer, getUUID, guildLevel } from "~/utils/Hypixel.js"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ChatInputCommandInteraction } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { IGuildData } from "~/interfaces"
|
||||
import { IGuildData } from "~/typings"
|
||||
import { numberFormatter } from "~/utils/Functions/intlFormaters.js"
|
||||
import { getGuild, getIGN, getPlayer, getUUID } from "~/utils/Hypixel.js"
|
||||
import { redis } from "~/utils/Illegitimate.js"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType, InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "help",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor, instructionsgif } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "instructions",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { admin, helper } from "~/config/roles.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import leave from "./music/leave.js"
|
||||
import nowplaying from "./music/nowplaying.js"
|
||||
import pause from "./music/pause.js"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "ping",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InteractionContextType, SlashCommandBuilder, User } from "discord.js"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import env from "~/utils/Env.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandB
|
||||
import { getWaitingList, removeWaitingList } from "src/drizzle/functions.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { waitingListRole } from "~/config/roles.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { bwfkdr, bwstars, bwwins, duelswins, duelswlr, swkdr, swstars } from "~/config/reqs.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "reqs",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ChannelType, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, TextChannel } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "send",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
TextChannel
|
||||
} from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "setup",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { channelMention, ChannelType, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, TextChannel, userMention } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import beast from "./staff/beast.js"
|
||||
import help from "./staff/help.js"
|
||||
import prune from "./staff/prune.js"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ChatInputCommandInteraction, GuildMember } from "discord.js"
|
||||
import { getVerifies } from "src/drizzle/functions.js"
|
||||
import { embedColor, hypixelGuildID } from "~/config/options.js"
|
||||
import { IGuildData } from "~/interfaces"
|
||||
import { IGuildData } from "~/typings"
|
||||
import env from "~/utils/Env.js"
|
||||
import roleManage from "~/utils/Functions/rolesmanage.js"
|
||||
import { getGuild } from "~/utils/Hypixel.js"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ChannelType, ChatInputCommandInteraction, GuildMember } from "discord.js"
|
||||
import { getVerifies } from "src/drizzle/functions.js"
|
||||
import { embedColor, hypixelGuildID } from "~/config/options.js"
|
||||
import { IGuildData } from "~/interfaces"
|
||||
import { IGuildData } from "~/typings"
|
||||
import env from "~/utils/Env.js"
|
||||
import getGuildRank from "~/utils/Functions/guildrank.js"
|
||||
import roleManage from "~/utils/Functions/rolesmanage.js"
|
||||
|
||||
@@ -2,7 +2,7 @@ import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandB
|
||||
import ms from "ms"
|
||||
import prettyMs from "pretty-ms"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, User, userMention } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { GuildMember, InteractionContextType, SlashCommandBuilder } from "discor
|
||||
import { getVerify } from "src/drizzle/functions.js"
|
||||
import { devMessage, embedColor, hypixelGuildID } from "~/config/options.js"
|
||||
import { waitingListRole } from "~/config/roles.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import getGuildRank from "~/utils/Functions/guildrank.js"
|
||||
import roleManage from "~/utils/Functions/rolesmanage.js"
|
||||
import { getGuild, getHeadURL, getIGN } from "~/utils/Hypixel.js"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import { formatUuid, getHeadURL, getIGN, getUUID } from "~/utils/Hypixel.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { GuildMember, InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||
import { addVerify, getVerify } from "src/drizzle/functions.js"
|
||||
import { devMessage, embedColor, hypixelGuildID } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { IPlayerData } from "~/interfaces"
|
||||
import { IGuildData } from "~/interfaces"
|
||||
import { ICommand, IGuildData, IPlayerData } from "~/typings"
|
||||
import getGuildRank from "~/utils/Functions/guildrank.js"
|
||||
import roleManage from "~/utils/Functions/rolesmanage.js"
|
||||
import { getGuild, getHeadURL, getPlayer, getUUID } from "~/utils/Hypixel.js"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { InteractionContextType, SlashCommandBuilder, userMention } from "discord.js"
|
||||
import { getVerify } from "src/drizzle/functions.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import { getHeadURL, getIGN } from "~/utils/Hypixel.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||
import { getVerify } from "src/drizzle/functions.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import { getHeadURL, getIGN } from "~/utils/Hypixel.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { QueryType, useMainPlayer } from "discord-player"
|
||||
import { IAutocomplete } from "~/interfaces"
|
||||
import { IAutocomplete } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "music",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IAutocomplete } from "~/interfaces"
|
||||
import { IAutocomplete } from "~/typings"
|
||||
import { log } from "~/utils/Logger.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getGuildApp } from "src/drizzle/functions.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { bwfkdr, bwstars, bwwins, duelswins, duelswlr, swkdr, swstars } from "~/config/reqs.js"
|
||||
import { IButton } from "~/interfaces"
|
||||
import { IButton } from "~/typings"
|
||||
import { bedwarsLevel, getGuild, getHeadURL, getPlayer, hypixelLevel, skywarsLevel } from "~/utils/Hypixel.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { getGuildApp, removeVerify } from "src/drizzle/functions.js"
|
||||
import { addWaitingList, getWaitingLists, removeWaitingList } from "src/drizzle/functions.js"
|
||||
import { embedColor, hypixelGuildID, waitingListChannel, waitingListMessage } from "~/config/options.js"
|
||||
import { waitingListRole } from "~/config/roles.js"
|
||||
import { IButton } from "~/interfaces"
|
||||
import { IButton } from "~/typings"
|
||||
import { getGuild, getIGN } from "~/utils/Hypixel.js"
|
||||
import { log } from "~/utils/Logger.js"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle } from "discord.js"
|
||||
import { IButton } from "~/interfaces"
|
||||
import { IButton } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "guildapplicationdeny",
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ignM, largeM, smallM } from "~/config/limitmessages.js"
|
||||
import { applicationsChannel, embedColor } from "~/config/options.js"
|
||||
import { guild as guildQuestions } from "~/config/questions.js"
|
||||
import { guildRole } from "~/config/roles.js"
|
||||
import { IButton } from "~/interfaces"
|
||||
import { IButton } from "~/typings"
|
||||
import applicationQuestions from "~/utils/Functions/applicationquestions.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ignM, largeM, smallM } from "~/config/limitmessages.js"
|
||||
import { embedColor, inactivityLogChannel } from "~/config/options.js"
|
||||
import { inactivity } from "~/config/questions.js"
|
||||
import { beast, gm, guildRole, guildStaff, leader, member, staff } from "~/config/roles.js"
|
||||
import { IButton } from "~/interfaces"
|
||||
import { IButton } from "~/typings"
|
||||
import applicationQuestions from "~/utils/Functions/applicationquestions.js"
|
||||
const guildRoles = [gm, leader, staff, beast, member, guildStaff, guildRole]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IButton } from "~/interfaces"
|
||||
import { IButton } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "inactiveapplicationaccept",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IButton } from "~/interfaces"
|
||||
import { IButton } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "inactiveapplicationdeny",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js"
|
||||
import { removeStaffApp } from "src/drizzle/functions.js"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { IButton } from "~/interfaces"
|
||||
import { IButton } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "staffapplicationaccept",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle } from "discord.js"
|
||||
import { IButton } from "~/interfaces"
|
||||
import { IButton } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "staffapplicationdeny",
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ignM, largeM } from "~/config/limitmessages.js"
|
||||
import { embedColor, staffApplicationsChannel } from "~/config/options.js"
|
||||
import { staff as staffQuestions } from "~/config/questions.js"
|
||||
import { guildRole, guildStaff } from "~/config/roles.js"
|
||||
import { IButton } from "~/interfaces"
|
||||
import { IButton } from "~/typings"
|
||||
import env from "~/utils/Env.js"
|
||||
import applicationQuestions from "~/utils/Functions/applicationquestions.js"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle } from "discord.js"
|
||||
import { IButton } from "~/interfaces"
|
||||
import { IButton } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "verify",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { getWaitingLists, removeWaitingList } from "src/drizzle/functions.js"
|
||||
import { hypixelGuildID } from "~/config/options.js"
|
||||
import { IButton } from "~/interfaces"
|
||||
import { IButton } from "~/typings"
|
||||
import { getGuild, getIGN } from "~/utils/Hypixel.js"
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder, GuildMember, Message } from "discord.js"
|
||||
import { removeGuildApp } from "src/drizzle/functions.js"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { IModal } from "~/interfaces"
|
||||
import { IModal } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "denyreasonbox",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder } from "discord.js"
|
||||
import { removeStaffApp } from "src/drizzle/functions.js"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { IModal } from "~/interfaces"
|
||||
import { IModal } from "~/typings"
|
||||
|
||||
export default {
|
||||
name: "staffdenyreasonbox",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { GuildMember } from "discord.js"
|
||||
import { addVerify, getVerify } from "src/drizzle/functions.js"
|
||||
import { devMessage, embedColor, hypixelGuildID } from "~/config/options.js"
|
||||
import { IModal } from "~/interfaces"
|
||||
import { IModal } from "~/typings"
|
||||
import getGuildRank from "~/utils/Functions/guildrank.js"
|
||||
import roleManage from "~/utils/Functions/rolesmanage.js"
|
||||
import { getGuild, getHeadURL, getPlayer, getUUID } from "~/utils/Hypixel.js"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { TextChannel } from "discord.js"
|
||||
import { devMessage, embedColor, guildLogChannel, hypixelGuildID } from "~/config/options.js"
|
||||
import { ICron, IGuildData } from "~/interfaces"
|
||||
import { ICron, IGuildData } from "~/typings"
|
||||
import { numberFormatter } from "~/utils/Functions/intlFormaters.js"
|
||||
import { getGuild, getIGN } from "~/utils/Hypixel.js"
|
||||
import { client } from "~/utils/Illegitimate.js"
|
||||
|
||||
@@ -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: [{
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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" })
|
||||
}
|
||||
|
||||
|
||||
@@ -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", {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
import { ClientEvents } from "discord.js"
|
||||
|
||||
type IEvent<E extends keyof ClientEvents> = (...args: ClientEvents[E]) => void
|
||||
|
||||
export default IEvent
|
||||
@@ -1,13 +0,0 @@
|
||||
import IAutocomplete from "./IAutocomplete"
|
||||
import IButton from "./IButton"
|
||||
import ICommand from "./ICommand"
|
||||
import IContextMenu from "./IContextMenu"
|
||||
import IEvent from "./IEvent"
|
||||
import IModal from "./IModal"
|
||||
|
||||
import ICron from "./ICron"
|
||||
|
||||
import { IGuild, IGuildData } from "./IGuild"
|
||||
import { IPlayer, IPlayerData } from "./IPlayer"
|
||||
|
||||
export { IAutocomplete, IButton, ICommand, IContextMenu, ICron, IEvent, IGuild, IGuildData, IModal, IPlayer, IPlayerData }
|
||||
@@ -1,7 +1,7 @@
|
||||
import { AutocompleteInteraction } from "discord.js"
|
||||
import { ExtendedClient } from "~/utils/Client.js"
|
||||
|
||||
export default interface IAutocomplete {
|
||||
export interface IAutocomplete {
|
||||
name: string
|
||||
description: string
|
||||
execute: (arg: { interaction: AutocompleteInteraction, client: ExtendedClient }) => Promise<void>
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ButtonInteraction } from "discord.js"
|
||||
import { ExtendedClient } from "~/utils/Client.js"
|
||||
|
||||
export default interface IButton {
|
||||
export interface IButton {
|
||||
name: string
|
||||
description: string
|
||||
execute: (arg: { interaction: ButtonInteraction, client: ExtendedClient }) => Promise<void>
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js"
|
||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||
|
||||
export default interface ICommand {
|
||||
export interface ICommand {
|
||||
name: string
|
||||
description: string
|
||||
dev?: boolean
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ContextMenuCommandBuilder, ContextMenuCommandInteraction } from "discord.js"
|
||||
import { ExtendedClient } from "~/utils/Client.js"
|
||||
|
||||
export default interface IContextMenu {
|
||||
export interface IContextMenu {
|
||||
name: string
|
||||
description: string
|
||||
dev?: boolean
|
||||
@@ -1,6 +1,6 @@
|
||||
import { TimeZones } from "~/typings"
|
||||
import { TimeZones } from "./TimeZones"
|
||||
|
||||
interface TimeFormat {
|
||||
interface ITimeFormat {
|
||||
seconds: "*" | number
|
||||
minutes: "*" | number
|
||||
hours: "*" | number
|
||||
@@ -9,8 +9,8 @@ interface TimeFormat {
|
||||
dayOfWeek: "*" | number
|
||||
}
|
||||
|
||||
export default interface ICron {
|
||||
time: TimeFormat
|
||||
export interface ICron {
|
||||
time: ITimeFormat
|
||||
execute: () => void
|
||||
onComplete?: null | undefined
|
||||
start?: boolean | null | undefined
|
||||
3
src/typings/Event.ts
Normal file
3
src/typings/Event.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { ClientEvents } from "discord.js"
|
||||
|
||||
export type Event<E extends keyof ClientEvents> = (...args: ClientEvents[E]) => void
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ModalSubmitInteraction } from "discord.js"
|
||||
import { ExtendedClient } from "~/utils/Client.js"
|
||||
|
||||
export default interface IModal {
|
||||
export interface IModal {
|
||||
name: string
|
||||
description: string
|
||||
execute: (arg: { interaction: ModalSubmitInteraction, client: ExtendedClient }) => Promise<void>
|
||||
4
src/typings/SubCommand.ts
Normal file
4
src/typings/SubCommand.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { ChatInputCommandInteraction } from "discord.js"
|
||||
|
||||
export type SubCommand = (interaction: ChatInputCommandInteraction) => Promise<void>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const TimeZones = [
|
||||
type TimeZonesArray = [
|
||||
"Africa/Abidjan",
|
||||
"Africa/Accra",
|
||||
"Africa/Addis_Ababa",
|
||||
@@ -427,6 +427,6 @@ const TimeZones = [
|
||||
"Pacific/Truk",
|
||||
"Pacific/Wake",
|
||||
"Pacific/Wallis"
|
||||
] as const
|
||||
]
|
||||
|
||||
export default TimeZones
|
||||
export type TimeZones = TimeZonesArray[number]
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
import TZs from "./TimeZones"
|
||||
|
||||
export type TimeZones = typeof TZs[number]
|
||||
export * from "./Autocomplete"
|
||||
export * from "./Button"
|
||||
export * from "./Command"
|
||||
export * from "./ContextMenu"
|
||||
export * from "./Cron"
|
||||
export * from "./Event"
|
||||
export * from "./Guild"
|
||||
export * from "./Modal"
|
||||
export * from "./Player"
|
||||
export * from "./SubCommand"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { RESTPostAPIChatInputApplicationCommandsJSONBody, RESTPostAPIContextMenuApplicationCommandsJSONBody } from "discord.js"
|
||||
import fs from "fs"
|
||||
import { ICommand, IContextMenu } from "~/interfaces"
|
||||
import { ICommand, IContextMenu } from "~/typings"
|
||||
import { ExtendedClient } from "./Client.js"
|
||||
import env from "./Env.js"
|
||||
import { log } from "./Logger.js"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Client, Collection, GatewayIntentBits, Partials } from "discord.js"
|
||||
import { IAutocomplete, IButton, ICommand, IContextMenu, IModal } from "~/interfaces"
|
||||
import { IAutocomplete, IButton, ICommand, IContextMenu, IModal } from "~/typings"
|
||||
import autoDeployCommands from "./Autodeploy.js"
|
||||
import env from "./Env.js"
|
||||
import { log } from "./Logger.js"
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Events } from "discord.js"
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { IAutocomplete } from "~/interfaces"
|
||||
import { IAutocomplete } from "~/typings"
|
||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
type FileType = "js" | "ts"
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Events } from "discord.js"
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { IButton } from "~/interfaces"
|
||||
import { IButton } from "~/typings"
|
||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
type FileType = "js" | "ts"
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Events } from "discord.js"
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { ICommand } from "~/typings"
|
||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
type FileType = "js" | "ts"
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Events } from "discord.js"
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { IContextMenu } from "~/interfaces"
|
||||
import { IContextMenu } from "~/typings"
|
||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
type FileType = "js" | "ts"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { CronJob } from "cron"
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import { ICron } from "~/interfaces"
|
||||
import { ICron } from "~/typings"
|
||||
type FileType = "js" | "ts"
|
||||
|
||||
export default async function loadCronEvents(ft: FileType) {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Events } from "discord.js"
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { IModal } from "~/interfaces"
|
||||
import { IModal } from "~/typings"
|
||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
type FileType = "js" | "ts"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import axios from "axios"
|
||||
import { IPlayer, IPlayerData } from "~/interfaces"
|
||||
import { IGuild, IGuildData } from "~/interfaces"
|
||||
import { IGuild, IGuildData, IPlayer, IPlayerData } from "~/typings"
|
||||
import env from "~/utils/Env.js"
|
||||
const apikey = env.prod.hypixelapikey
|
||||
const mojang = "https://api.mojang.com/users/profiles/minecraft/"
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
"~/config/*": [
|
||||
"src/config/*"
|
||||
],
|
||||
"~/interfaces": [
|
||||
"src/interfaces/index"
|
||||
],
|
||||
"~/typings": [
|
||||
"src/typings/index"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user