generated from nhcarrigan/template
feat: add /announcement owner-only slash command
Triggers a modal with a content text input and category select menu, calls the announcement API, DMs generated copy as file attachments, and replies ephemerally with the platform recap.
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
import { DiscordAnalytics } from "@nhcarrigan/discord-analytics";
|
||||
import { Client, Events, GatewayIntentBits, Partials } from "discord.js";
|
||||
import { chatInputInteractionCreate } from "./events/interactionCreate.js";
|
||||
import {
|
||||
modalSubmitInteractionCreate,
|
||||
} from "./events/modalInteractionCreate.js";
|
||||
import { logger } from "./utils/logger.js";
|
||||
|
||||
/*
|
||||
@@ -51,6 +54,10 @@ hikari.once(Events.ClientReady, () => {
|
||||
hikari.on(Events.InteractionCreate, (interaction) => {
|
||||
if (interaction.isChatInputCommand()) {
|
||||
void chatInputInteractionCreate(hikari, interaction);
|
||||
return;
|
||||
}
|
||||
if (interaction.isModalSubmit()) {
|
||||
void modalSubmitInteractionCreate(hikari, interaction);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user