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",
|
target: "esnext",
|
||||||
logLevel: "info",
|
logLevel: "info",
|
||||||
outfile: "dist/index.js",
|
outfile: "dist/index.js",
|
||||||
minify: true,
|
minify: !process.argv.includes("start"),
|
||||||
treeShaking: true, // shake it off shake it offff
|
treeShaking: true, // shake it off shake it offff
|
||||||
jsx: "transform",
|
jsx: "transform",
|
||||||
inject: ["components-jsx/runtime.ts"],
|
inject: ["components-jsx/runtime.ts"],
|
||||||
|
|
|
@ -2,9 +2,14 @@ import { ComponentTypes, ContainerComponent } from "oceanic.js";
|
||||||
|
|
||||||
import { childrenToArray } from "./utils";
|
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 {
|
return {
|
||||||
type: ComponentTypes.CONTAINER,
|
type: ComponentTypes.CONTAINER,
|
||||||
components: childrenToArray(children),
|
components: childrenToArray(children),
|
||||||
|
|
|
@ -3,10 +3,10 @@ import { client } from "..";
|
||||||
import { Thumbnail } from "components-jsx/Thumbnail";
|
import { Thumbnail } from "components-jsx/Thumbnail";
|
||||||
import { TextDisplay } from "components-jsx/TextDisplay";
|
import { TextDisplay } from "components-jsx/TextDisplay";
|
||||||
import { br } from "components-jsx/br";
|
import { br } from "components-jsx/br";
|
||||||
|
import { User as DiscordUser } from "oceanic.js";
|
||||||
|
|
||||||
export async function User(props: { id: string }) {
|
export function User(props: { user: DiscordUser }) {
|
||||||
const user = await client.rest.users.get(props.id);
|
const { user } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Section
|
<Section
|
||||||
accessory={
|
accessory={
|
||||||
|
|
|
@ -11,7 +11,7 @@ export async function openDb() {
|
||||||
|
|
||||||
db.exec(
|
db.exec(
|
||||||
`CREATE TABLE IF NOT EXISTS applications (
|
`CREATE TABLE IF NOT EXISTS applications (
|
||||||
id TEXT PRIMARY KEY,
|
id TEXT,
|
||||||
user_id TEXT,
|
user_id TEXT,
|
||||||
status INTEGER,
|
status INTEGER,
|
||||||
responses TEXT,
|
responses TEXT,
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { AllIntents, Client, ComponentTypes, MessageFlags } from "oceanic.js";
|
||||||
import { selfappReq } from "./selfappReq";
|
import { selfappReq } from "./selfappReq";
|
||||||
import { setupJoinRequestHandler } from "./joinRequestHandler";
|
import { setupJoinRequestHandler } from "./joinRequestHandler";
|
||||||
import { Constants } from "./Constants";
|
import { Constants } from "./Constants";
|
||||||
import { Divider, generateList, generateUserComponent, Header } from "./cv2";
|
|
||||||
import { openDb } from "./database";
|
import { openDb } from "./database";
|
||||||
|
|
||||||
export const client = new Client({
|
export const client = new Client({
|
||||||
|
|
|
@ -60,6 +60,9 @@ export async function setupJoinRequestHandler(shard: Shard) {
|
||||||
application.message_id
|
application.message_id
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
const user = await client.rest.users.get(
|
||||||
|
applicationData.user_id
|
||||||
|
);
|
||||||
await client.rest.channels.createMessage(
|
await client.rest.channels.createMessage(
|
||||||
Constants.REJECTION_CHANNEL_ID,
|
Constants.REJECTION_CHANNEL_ID,
|
||||||
<ComponentMessage>
|
<ComponentMessage>
|
||||||
|
@ -68,7 +71,7 @@ export async function setupJoinRequestHandler(shard: Shard) {
|
||||||
## Join request withdrawn
|
## Join request withdrawn
|
||||||
</TextDisplay>
|
</TextDisplay>
|
||||||
<Divider />
|
<Divider />
|
||||||
<User id={applicationData.user_id} />
|
<User user={user} />
|
||||||
<Divider />
|
<Divider />
|
||||||
<TextDisplay>### Application</TextDisplay>
|
<TextDisplay>### Application</TextDisplay>
|
||||||
{application ? (
|
{application ? (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue