Files
chibika/src/modules/sendUnentitledResponse.ts
T
2025-07-19 15:51:14 -07:00

38 lines
976 B
TypeScript

/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import {
ActionRowBuilder,
ButtonBuilder,
ButtonStyle,
MessageFlags,
type ChatInputCommandInteraction,
} from "discord.js";
import { unentitledImage } from "../config/entitlements.js";
import { getArtComponents } from "./getArtComponents.js";
/**
* Responds with a default image and a button to subscribe.
* @param interaction - The interaction object from Discord.
*/
export const sendUnentitledResponse = async(
interaction: ChatInputCommandInteraction,
): Promise<void> => {
const [ container ] = getArtComponents(unentitledImage);
const components = [
container,
new ActionRowBuilder<ButtonBuilder>().addComponents(
new ButtonBuilder().
setStyle(ButtonStyle.Premium).
setSKUId("1396226651620118579"),
),
];
await interaction.reply({
components: components,
flags: [ MessageFlags.IsComponentsV2 ],
});
};