generated from nhcarrigan/template
wip: commands
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user