From c72b63b730e263d867e07643b6cd38f867ffe1d4 Mon Sep 17 00:00:00 2001 From: Taken Date: Sun, 10 Aug 2025 23:15:05 +0200 Subject: [PATCH] Final docker version --- Dockerfile | 3 +-- src/commands/botinfo.ts | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 844a5fd..f325f87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,6 @@ RUN bun bundle FROM oven/bun WORKDIR /app -COPY --from=build /app/dist /app/dist -COPY --from=build /app/package.json /app +COPY --from=build /app/dist /app CMD ["bun", "run", "dist/index.js"] diff --git a/src/commands/botinfo.ts b/src/commands/botinfo.ts index 6e9c191..85fd515 100644 --- a/src/commands/botinfo.ts +++ b/src/commands/botinfo.ts @@ -1,13 +1,10 @@ import { execSync } from "child_process" import { InteractionContextType, SlashCommandBuilder } from "discord.js" -import { createRequire } from "node:module" import os from "os" import prettyMs from "pretty-ms" import { devMessage, embedColor } from "~/config/options" import { ICommand } from "~/typings" - -const require = createRequire(import.meta.url) -const { dependencies, devDependencies } = require("../../package.json") +import packageJson from "../../package.json" export default { name: "botinfo", @@ -21,6 +18,7 @@ export default { .setContexts(InteractionContextType.Guild), async execute({ interaction, client }) { + const { dependencies, devDependencies } = packageJson const castedDeps = dependencies as { [key: string]: string } const castedDevDeps = devDependencies as { [key: string]: string } let osInfo: string