Removed unneeded .js extensions
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { RESTPostAPIChatInputApplicationCommandsJSONBody, RESTPostAPIContextMenuApplicationCommandsJSONBody } from "discord.js"
|
||||
import fs from "fs"
|
||||
import { ICommand, IContextMenu } from "~/typings"
|
||||
import { ExtendedClient } from "./Client.js"
|
||||
import env from "./Env.js"
|
||||
import { log } from "./Logger.js"
|
||||
import { ExtendedClient } from "./Client"
|
||||
import env from "./Env"
|
||||
import { log } from "./Logger"
|
||||
type FileType = "js" | "ts"
|
||||
|
||||
export default async function autoDeployCommands(fileType: FileType, client: ExtendedClient) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Client, Collection, GatewayIntentBits, Partials } from "discord.js"
|
||||
import { IAutocomplete, IButton, ICommand, IContextMenu, IModal } from "~/typings"
|
||||
import autoDeployCommands from "./Autodeploy.js"
|
||||
import env from "./Env.js"
|
||||
import { log } from "./Logger.js"
|
||||
import autoDeployCommands from "./Autodeploy"
|
||||
import env from "./Env"
|
||||
import { log } from "./Logger"
|
||||
|
||||
export class ExtendedClient extends Client {
|
||||
commands: Collection<string, ICommand> = new Collection()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createEnv } from "@t3-oss/env-core"
|
||||
import { z } from "zod"
|
||||
import { MissingEnvVarsError } from "./Classes/EnvVarError.js"
|
||||
import { MissingEnvVarsError } from "./Classes/EnvVarError"
|
||||
|
||||
const prodEnv = createEnv({
|
||||
server: {
|
||||
@@ -8,7 +8,8 @@ const prodEnv = createEnv({
|
||||
DEV: z.string({ message: "DEV" }).min(1),
|
||||
HYPIXELAPIKEY: z.string({ message: "HYPIXELAPIKEY" }).min(1),
|
||||
REDISURI: z.string({ message: "REDISURI" }).min(1),
|
||||
POSTGRESURI: z.string({ message: "POSTGRESURI" }).min(1)
|
||||
POSTGRESURI: z.string({ message: "POSTGRESURI" }).min(1),
|
||||
GEMINIAPIKEY: z.string({ message: "GEMINIAPIKEY" }).min(1)
|
||||
},
|
||||
runtimeEnv: process.env,
|
||||
onValidationError: (e) => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Events } from "discord.js"
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { embedColor } from "~/config/options"
|
||||
import { IAutocomplete } from "~/typings"
|
||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
import { ExtendedClient as Client } from "~/utils/Client"
|
||||
import logToChannel from "~/utils/Functions/logtochannel"
|
||||
type FileType = "js" | "ts"
|
||||
|
||||
export default async function loadAutocompleteEvents(client: Client, ft: FileType) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Events, MessageFlags } from "discord.js"
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { embedColor } from "~/config/options"
|
||||
import { IButton } from "~/typings"
|
||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
import { ExtendedClient as Client } from "~/utils/Client"
|
||||
import logToChannel from "~/utils/Functions/logtochannel"
|
||||
type FileType = "js" | "ts"
|
||||
|
||||
export default async function loadButtonEvents(client: Client, ft: FileType) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Events, MessageFlags } from "discord.js"
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { embedColor } from "~/config/options"
|
||||
import { ICommand } from "~/typings"
|
||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
import { ExtendedClient as Client } from "~/utils/Client"
|
||||
import logToChannel from "~/utils/Functions/logtochannel"
|
||||
type FileType = "js" | "ts"
|
||||
|
||||
export default async function loadSlashCommandsEvents(client: Client, ft: FileType) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Events, MessageFlags } from "discord.js"
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { embedColor } from "~/config/options"
|
||||
import { IContextMenu } from "~/typings"
|
||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
import { ExtendedClient as Client } from "~/utils/Client"
|
||||
import logToChannel from "~/utils/Functions/logtochannel"
|
||||
type FileType = "js" | "ts"
|
||||
|
||||
export default async function loadContextMenuEvents(client: Client, ft: FileType) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||
import { ExtendedClient as Client } from "~/utils/Client"
|
||||
type FileType = "js" | "ts"
|
||||
|
||||
export default async function loadEvents(client: Client, ft: FileType) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { ExtendedClient as Client } from "../Client.js"
|
||||
import loadAutocompleteEvents from "./autocomplete.js"
|
||||
import loadButtonEvents from "./button.js"
|
||||
import loadSlashCommandsEvents from "./command.js"
|
||||
import loadContextMenuEvents from "./contextmenu.js"
|
||||
import loadCronEvents from "./cron.js"
|
||||
import loadEvents from "./events.js"
|
||||
import loadModalEvents from "./modal.js"
|
||||
import { ExtendedClient as Client } from "../Client"
|
||||
import loadAutocompleteEvents from "./autocomplete"
|
||||
import loadButtonEvents from "./button"
|
||||
import loadSlashCommandsEvents from "./command"
|
||||
import loadContextMenuEvents from "./contextmenu"
|
||||
import loadCronEvents from "./cron"
|
||||
import loadEvents from "./events"
|
||||
import loadModalEvents from "./modal"
|
||||
|
||||
export default async function loadAllEvents(client: Client, ft: "js" | "ts") {
|
||||
await loadEvents(client, ft)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Events, MessageFlags } from "discord.js"
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { embedColor } from "~/config/options"
|
||||
import { IModal } from "~/typings"
|
||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
import { ExtendedClient as Client } from "~/utils/Client"
|
||||
import logToChannel from "~/utils/Functions/logtochannel"
|
||||
type FileType = "js" | "ts"
|
||||
|
||||
export default async function loadModalEvents(client: Client, ft: FileType) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Collection, EmbedBuilder, GuildMember, Message } from "discord.js"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { getUUID } from "~/utils/Hypixel.js"
|
||||
import { embedColor } from "~/config/options"
|
||||
import { getUUID } from "~/utils/Hypixel"
|
||||
|
||||
const tooLong = new EmbedBuilder()
|
||||
.setDescription("You took too long to respond.")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import roleManage from "./rolesmanage.js"
|
||||
import roleManage from "./rolesmanage"
|
||||
|
||||
export default function getGuildRank(rank: string) {
|
||||
if (rank === "Guild Master") {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Guild, MessageCreateOptions, TextChannel } from "discord.js"
|
||||
import { botLogChannel, devLogChannel, errorLogChannel, guildid, guildLogChannel, moderationLogChannel, onlineLogChannel } from "~/config/options.js"
|
||||
import { client } from "~/utils/Illegitimate.js"
|
||||
import { log } from "../Logger.js"
|
||||
import { botLogChannel, devLogChannel, errorLogChannel, guildid, guildLogChannel, moderationLogChannel, onlineLogChannel } from "~/config/options"
|
||||
import { client } from "~/utils/Illegitimate"
|
||||
import { log } from "../Logger"
|
||||
|
||||
const channels = {
|
||||
online: onlineLogChannel,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { beast, defaultMember, elite, gm, guildRole, guildStaff, leader, member, staff, verifyTick } from "~/config/roles.js"
|
||||
import { beast, defaultMember, elite, gm, guildRole, guildStaff, leader, member, staff, verifyTick } from "~/config/roles"
|
||||
const roles = [
|
||||
gm,
|
||||
leader,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import axios from "axios"
|
||||
import { IGuild, IGuildData, IPlayer, IPlayerData } from "~/typings"
|
||||
import env from "~/utils/Env.js"
|
||||
import env from "~/utils/Env"
|
||||
const apikey = env.prod.HYPIXELAPIKEY
|
||||
const mojang = "https://api.mojang.com/users/profiles/minecraft/"
|
||||
const mojanguuid = "https://sessionserver.mojang.com/session/minecraft/profile/"
|
||||
|
||||
@@ -2,10 +2,10 @@ import { DefaultExtractors } from "@discord-player/extractor"
|
||||
import { Player } from "discord-player"
|
||||
import { YoutubeiExtractor } from "discord-player-youtubei"
|
||||
import { Redis } from "ioredis"
|
||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||
import env from "~/utils/Env.js"
|
||||
import loadAllEvents from "./Events/loadevents.js"
|
||||
import { log } from "./Logger.js"
|
||||
import { ExtendedClient as Client } from "~/utils/Client"
|
||||
import env from "~/utils/Env"
|
||||
import loadAllEvents from "./Events/loadevents"
|
||||
import { log } from "./Logger"
|
||||
|
||||
const client = new Client()
|
||||
const redis = new Redis(env.prod.REDISURI)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import chalk from "chalk"
|
||||
import { logTimeFormatter } from "./Functions/intlFormaters.js"
|
||||
import { logTimeFormatter } from "./Functions/intlFormaters"
|
||||
|
||||
const colors = {
|
||||
red: "#f38ba8",
|
||||
|
||||
Reference in New Issue
Block a user