feat: webhook for forms
Node.js CI / Lint and Test (push) Successful in 45s

This commit is contained in:
2025-08-27 18:55:22 -07:00
parent b92fe0a730
commit d5c0abe4d8
6 changed files with 140 additions and 2 deletions
+20 -2
View File
@@ -4,9 +4,14 @@
* @author Naomi Carrigan
*/
import { Client, GatewayIntentBits, Events, Partials } from "discord.js";
import { Client,
GatewayIntentBits,
Events,
Partials,
MessageFlags } from "discord.js";
import { scheduleJob } from "node-schedule";
import { App } from "octokit";
import { ids } from "./config/ids.js";
import { handleMessageCreate } from "./events/handleMessageCreate.js";
import { cacheData } from "./modules/cacheData.js";
import {
@@ -72,8 +77,21 @@ amari.discord.on(Events.MessageCreate, (message) => {
amari.discord.on(Events.InteractionCreate, (interaction) => {
if (interaction.isButton() && interaction.customId === "resolve") {
void interaction.message.delete();
if (interaction.user.id !== ids.users.naomi) {
return void interaction.reply(
{ content: "Who are you????",
flags: [ MessageFlags.Ephemeral ] },
);
}
return void interaction.message.delete();
}
if (interaction.isAutocomplete()) {
return void interaction;
}
return void interaction.reply({
content: "What?",
flags: [ MessageFlags.Ephemeral ],
});
});
amari.discord.on(Events.UserUpdate, (_oldUser, updatedUser) => {