generated from nhcarrigan/template
2991a56147
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.
25 lines
1.2 KiB
JavaScript
25 lines
1.2 KiB
JavaScript
import { ApplicationIntegrationType, InteractionContextType, SlashCommandBuilder } from "discord.js";
|
|
|
|
const about = new SlashCommandBuilder()
|
|
.setName("about")
|
|
.setDescription("Get information about this application.")
|
|
.setContexts([InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel])
|
|
.setIntegrationTypes([ApplicationIntegrationType.UserInstall, ApplicationIntegrationType.GuildInstall]);
|
|
|
|
const announcement = new SlashCommandBuilder()
|
|
.setName("announcement")
|
|
.setDescription("Create a cross-platform announcement. (Owner only)")
|
|
.setContexts([InteractionContextType.BotDM, InteractionContextType.PrivateChannel])
|
|
.setIntegrationTypes([ApplicationIntegrationType.UserInstall]);
|
|
|
|
const dm = new SlashCommandBuilder()
|
|
.setName("dm")
|
|
.setDescription("Trigger a DM response so you can find your DM channel.")
|
|
.setContexts([InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel])
|
|
.setIntegrationTypes([ApplicationIntegrationType.UserInstall, ApplicationIntegrationType.GuildInstall]);
|
|
|
|
console.log(JSON.stringify([
|
|
about.toJSON(),
|
|
announcement.toJSON(),
|
|
dm.toJSON()
|
|
])) |