From 3fb6b6e2c2c0576376ebb3ee8f6869bb8301bf31 Mon Sep 17 00:00:00 2001 From: nin0 Date: Thu, 22 May 2025 19:10:38 -0400 Subject: [PATCH] useless slop --- build.mjs | 2 +- components-jsx/Container.tsx | 19 ++++++++++++------- src/components/User.tsx | 6 +++--- src/database.ts | 2 +- src/index.ts | 1 - src/joinRequestHandler.tsx | 5 ++++- 6 files changed, 21 insertions(+), 14 deletions(-) diff --git a/build.mjs b/build.mjs index 6a18b53..779904a 100644 --- a/build.mjs +++ b/build.mjs @@ -23,7 +23,7 @@ await build({ target: "esnext", logLevel: "info", outfile: "dist/index.js", - minify: true, + minify: !process.argv.includes("start"), treeShaking: true, // shake it off shake it offff jsx: "transform", inject: ["components-jsx/runtime.ts"], diff --git a/components-jsx/Container.tsx b/components-jsx/Container.tsx index 913757d..8cf180a 100644 --- a/components-jsx/Container.tsx +++ b/components-jsx/Container.tsx @@ -2,12 +2,17 @@ import { ComponentTypes, ContainerComponent } from "oceanic.js"; import { childrenToArray } from "./utils"; -export type ContainerProps = Omit & { children: ContainerComponent["components"]; }; +export type ContainerProps = Omit & { + children: ContainerComponent["components"]; +}; -export function Container({ children, ...props }: ContainerProps): ContainerComponent { - return { - type: ComponentTypes.CONTAINER, - components: childrenToArray(children), - ...props - }; +export function Container({ + children, + ...props +}: ContainerProps): ContainerComponent { + return { + type: ComponentTypes.CONTAINER, + components: childrenToArray(children), + ...props + }; } diff --git a/src/components/User.tsx b/src/components/User.tsx index 5fbbe04..98ccf1d 100644 --- a/src/components/User.tsx +++ b/src/components/User.tsx @@ -3,10 +3,10 @@ import { client } from ".."; import { Thumbnail } from "components-jsx/Thumbnail"; import { TextDisplay } from "components-jsx/TextDisplay"; import { br } from "components-jsx/br"; +import { User as DiscordUser } from "oceanic.js"; -export async function User(props: { id: string }) { - const user = await client.rest.users.get(props.id); - +export function User(props: { user: DiscordUser }) { + const { user } = props; return (
@@ -68,7 +71,7 @@ export async function setupJoinRequestHandler(shard: Shard) { ## Join request withdrawn - + ### Application {application ? (