useless slop

This commit is contained in:
nin0 2025-05-22 19:10:38 -04:00
parent 069400233a
commit 3fb6b6e2c2
Signed by: nin0
SSH key fingerprint: SHA256:NOoDnFVvZNFvqfXCIhzr6oCTDImZAbTTuyAysZ8Ufk8
6 changed files with 21 additions and 14 deletions

View file

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

View file

@ -2,9 +2,14 @@ import { ComponentTypes, ContainerComponent } from "oceanic.js";
import { childrenToArray } from "./utils";
export type ContainerProps = Omit<ContainerComponent, "type" | "components"> & { children: ContainerComponent["components"]; };
export type ContainerProps = Omit<ContainerComponent, "type" | "components"> & {
children: ContainerComponent["components"];
};
export function Container({ children, ...props }: ContainerProps): ContainerComponent {
export function Container({
children,
...props
}: ContainerProps): ContainerComponent {
return {
type: ComponentTypes.CONTAINER,
components: childrenToArray(children),

View file

@ -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 (
<Section
accessory={

View file

@ -11,7 +11,7 @@ export async function openDb() {
db.exec(
`CREATE TABLE IF NOT EXISTS applications (
id TEXT PRIMARY KEY,
id TEXT,
user_id TEXT,
status INTEGER,
responses TEXT,

View file

@ -2,7 +2,6 @@ import { AllIntents, Client, ComponentTypes, MessageFlags } from "oceanic.js";
import { selfappReq } from "./selfappReq";
import { setupJoinRequestHandler } from "./joinRequestHandler";
import { Constants } from "./Constants";
import { Divider, generateList, generateUserComponent, Header } from "./cv2";
import { openDb } from "./database";
export const client = new Client({

View file

@ -60,6 +60,9 @@ export async function setupJoinRequestHandler(shard: Shard) {
application.message_id
);
}
const user = await client.rest.users.get(
applicationData.user_id
);
await client.rest.channels.createMessage(
Constants.REJECTION_CHANNEL_ID,
<ComponentMessage>
@ -68,7 +71,7 @@ export async function setupJoinRequestHandler(shard: Shard) {
## Join request withdrawn
</TextDisplay>
<Divider />
<User id={applicationData.user_id} />
<User user={user} />
<Divider />
<TextDisplay>### Application</TextDisplay>
{application ? (