internal corporate restructuring (90% of our engineer team has been laid off and replaced by Grok)

This commit is contained in:
nin0 2025-05-24 20:00:39 -04:00
parent e377117d33
commit 7dcc0c2cc4
Signed by: nin0
SSH key fingerprint: SHA256:NOoDnFVvZNFvqfXCIhzr6oCTDImZAbTTuyAysZ8Ufk8
11 changed files with 184 additions and 96 deletions

View file

@ -1,50 +0,0 @@
import { ComponentTypes, InteractionTypes, MessageFlags } from "oceanic.js";
import { client } from ".";
import { db } from "./database";
import { PendingApplicationMessage } from "./components/PendingApplicationMessage";
import { canUser } from "./utils";
client.on("interactionCreate", async (interaction) => {
if (interaction.type === InteractionTypes.MESSAGE_COMPONENT)
if (interaction.data.componentType === ComponentTypes.BUTTON) {
if (!canUser(interaction.member!, "owner"))
return await interaction.createMessage({
flags: MessageFlags.EPHEMERAL,
content: "💢 nop"
});
const application = await db.get(
"SELECT * FROM applications WHERE message_id=?",
interaction.message.id
);
switch (interaction.data.customID.split("-")[0]) {
case "lock": {
await interaction.editParent(
<PendingApplicationMessage
id={application.id}
response={JSON.parse(application.responses)}
user={await client.rest.users.get(
application.user_id
)}
locked={true}
/>
);
break;
}
case "unlock": {
await interaction.editParent(
<PendingApplicationMessage
id={application.id}
response={JSON.parse(application.responses)}
user={await client.rest.users.get(
application.user_id
)}
locked={false}
/>
);
break;
}
}
}
});