generated from nhcarrigan/template
31 lines
859 B
TypeScript
31 lines
859 B
TypeScript
/**
|
|
* @copyright nhcarrigan
|
|
* @license Naomi's Public License
|
|
* @author Naomi Carrigan
|
|
*/
|
|
|
|
import {
|
|
ApplicationIntegrationType,
|
|
SlashCommandBuilder,
|
|
InteractionContextType,
|
|
} from "discord.js";
|
|
|
|
const command = new SlashCommandBuilder().
|
|
setContexts(
|
|
InteractionContextType.BotDM,
|
|
InteractionContextType.Guild,
|
|
InteractionContextType.PrivateChannel,
|
|
).
|
|
setIntegrationTypes(ApplicationIntegrationType.UserInstall).
|
|
setName("alt-text").
|
|
setDescription("Have Cordelia generate alt text for your image!").
|
|
addAttachmentOption((option) => {
|
|
return option.
|
|
setName("image").
|
|
setDescription("The image to generate alt-text for.").
|
|
setRequired(true);
|
|
});
|
|
|
|
// eslint-disable-next-line no-console -- We don't need our logger here as this never runs in production.
|
|
console.log(JSON.stringify(command.toJSON()));
|