useless slop
This commit is contained in:
parent
069400233a
commit
3fb6b6e2c2
6 changed files with 21 additions and 14 deletions
|
@ -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"],
|
||||
|
|
|
@ -2,12 +2,17 @@ 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 {
|
||||
return {
|
||||
type: ComponentTypes.CONTAINER,
|
||||
components: childrenToArray(children),
|
||||
...props
|
||||
};
|
||||
export function Container({
|
||||
children,
|
||||
...props
|
||||
}: ContainerProps): ContainerComponent {
|
||||
return {
|
||||
type: ComponentTypes.CONTAINER,
|
||||
components: childrenToArray(children),
|
||||
...props
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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={
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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 ? (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue