feat: ability to mark dms as resolved
Node.js CI / Lint and Test (push) Successful in 37s

This commit is contained in:
2025-08-19 18:19:20 -07:00
parent 3e765b3144
commit 344548c5d2
2 changed files with 18 additions and 0 deletions
+6
View File
@@ -35,5 +35,11 @@ amari.discord.on(Events.MessageCreate, (message) => {
void handleMessageCreate(amari, message);
});
amari.discord.on(Events.InteractionCreate, (interaction) => {
if (interaction.isButton() && interaction.customId === "resolve") {
void interaction.message.delete();
}
});
await amari.discord.login(process.env.BOT_TOKEN);
instantiateServer();
+12
View File
@@ -14,6 +14,7 @@ import type { User, APIMessageTopLevelComponent } from "discord.js";
* @returns An array of message component objects.
*/
export const getComponentsForNaomi
// eslint-disable-next-line max-lines-per-function -- Seriously??
= (
author: User,
content: string,
@@ -56,6 +57,17 @@ export const getComponentsForNaomi
type: 2,
url: url,
},
{
// eslint-disable-next-line @typescript-eslint/naming-convention -- Discord API convention.
custom_id: "resolve",
disabled: false,
emoji: {
name: "✅",
},
label: "resolve",
style: 3,
type: 2,
},
],
type: 1,
},