wip: commands

This commit is contained in:
2026-03-03 09:38:18 -08:00
parent 5a355e4775
commit 9df2d9ddc4
10 changed files with 433 additions and 1 deletions
+16
View File
@@ -14,6 +14,9 @@ import {
} from "discord.js";
import { scheduleJob } from "node-schedule";
import { App } from "octokit";
import { createIssue } from "./commands/createIssue.js";
import { createTask } from "./commands/createTask.js";
import { onboardMentee } from "./commands/onboardMentee.js";
import { ids } from "./config/ids.js";
import { handleMessageCreate } from "./events/handleMessageCreate.js";
import { cacheData } from "./modules/cacheData.js";
@@ -60,6 +63,7 @@ const amari: Amari = {
partials: [ Partials.Channel ],
}),
github: octokit,
githubApp,
lastRssItems: {
freeCodeCamp: null,
hackerNews: null,
@@ -114,6 +118,18 @@ amari.discord.on(Events.InteractionCreate, (interaction) => {
}
return void interaction.message.delete();
}
if (interaction.isChatInputCommand()) {
const { commandName } = interaction;
if (commandName === "onboard-mentee") {
return void onboardMentee(amari, interaction);
}
if (commandName === "create-task") {
return void createTask(interaction);
}
if (commandName === "create-issue") {
return void createIssue(interaction);
}
}
if (interaction.isAutocomplete()) {
return void interaction;
}