internal corporate restructuring (90% of our engineer team has been laid off and replaced by Grok)
This commit is contained in:
parent
e377117d33
commit
7dcc0c2cc4
11 changed files with 184 additions and 96 deletions
|
@ -1,7 +1,13 @@
|
|||
import { ButtonStyles, ComponentTypes, MessageFlags, Shard } from "oceanic.js";
|
||||
import {
|
||||
ButtonStyles,
|
||||
ChannelTypes,
|
||||
ComponentTypes,
|
||||
MessageFlags,
|
||||
Shard
|
||||
} from "oceanic.js";
|
||||
import { client } from ".";
|
||||
import { Constants } from "./Constants";
|
||||
import { db } from "./database";
|
||||
import { db } from "./utils/database";
|
||||
import {
|
||||
ActionRow,
|
||||
Button,
|
||||
|
@ -12,14 +18,15 @@ import {
|
|||
Separator,
|
||||
TextDisplay
|
||||
} from "~/components";
|
||||
import { selfappReq } from "./selfappReq";
|
||||
import { selfappReq } from "./utils/selfappReq";
|
||||
import { User } from "./components/User";
|
||||
import { Response } from "./types";
|
||||
import { match } from "./utils";
|
||||
import { Response } from "./utils/types";
|
||||
import { match } from "./utils/utils";
|
||||
import { PendingApplicationMessage } from "./components/PendingApplicationMessage";
|
||||
import { ApplicationContent } from "./components/ApplicationContent";
|
||||
|
||||
import("./lockUnlock");
|
||||
import("./joinRequestActions/lockUnlock");
|
||||
import("./joinRequestActions/interview");
|
||||
|
||||
export async function setupJoinRequestHandler(shard: Shard) {
|
||||
shard.ws?.on("message", async (d) => {
|
||||
|
@ -53,6 +60,16 @@ export async function setupJoinRequestHandler(shard: Shard) {
|
|||
const user = await client.rest.users.get(
|
||||
applicationData.request.user.id
|
||||
);
|
||||
const thread =
|
||||
await client.rest.channels.startThreadWithoutMessage(
|
||||
Constants.PENDING_CHANNEL_ID,
|
||||
{
|
||||
name: `${user.tag}'s application`,
|
||||
type: ChannelTypes.PUBLIC_THREAD,
|
||||
autoArchiveDuration: 10080
|
||||
}
|
||||
);
|
||||
|
||||
const pendingMsg =
|
||||
await client.rest.channels.createMessage(
|
||||
Constants.PENDING_CHANNEL_ID,
|
||||
|
@ -63,14 +80,10 @@ export async function setupJoinRequestHandler(shard: Shard) {
|
|||
locked={
|
||||
response.foundThrough === "sold"
|
||||
}
|
||||
threadID={thread.id}
|
||||
/>
|
||||
);
|
||||
|
||||
const thread = await pendingMsg.startThread({
|
||||
name: `${user.tag}'s application`,
|
||||
autoArchiveDuration: 10080
|
||||
});
|
||||
|
||||
const fullApplicantProfile: any = await selfappReq(
|
||||
`/users/${user.id}/profile`,
|
||||
"GET",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue