/** * @copyright NHCarrigan * @license Naomi's Public License * @author Naomi Carrigan */ import { TextDisplayBuilder, SeparatorBuilder, SeparatorSpacingSize, ContainerBuilder, ButtonBuilder, ButtonStyle, ActionRowBuilder, } from "discord.js"; const blocks = [ new ContainerBuilder(). addTextDisplayComponents( new TextDisplayBuilder().setContent("# About Altaria"), ). addTextDisplayComponents( new TextDisplayBuilder().setContent( // eslint-disable-next-line stylistic/max-len -- Big boi string. "Hi there~! I am Altaria, a bot that reminds your community members to include alt text in their images!", ), ). addSeparatorComponents( new SeparatorBuilder(). setSpacing(SeparatorSpacingSize.Small). setDivider(true), ). addTextDisplayComponents( new TextDisplayBuilder().setContent("## What can I do?"), ). addTextDisplayComponents( new TextDisplayBuilder().setContent( // eslint-disable-next-line stylistic/max-len -- Big boi string. "Super-duper simple! All you need to do is add me to your community, and ensure I can both see and send messages in whichever channels you want me to help out in! I will take care of the rest~", ), ). addSeparatorComponents( new SeparatorBuilder(). setSpacing(SeparatorSpacingSize.Small). setDivider(true), ). addTextDisplayComponents( new TextDisplayBuilder().setContent("## What if I need help?"), ). addTextDisplayComponents( new TextDisplayBuilder().setContent( // eslint-disable-next-line stylistic/max-len -- Big boi string. "My deepest apologies if I have made a mistake! Please reach out to us in our Discord server or on the forum, and we will do our best to assist you.", ), ), new ActionRowBuilder().addComponents( new ButtonBuilder(). setStyle(ButtonStyle.Link). setLabel("Discord Server"). setURL("https://chat.nhcarrigan.com"), new ButtonBuilder(). setStyle(ButtonStyle.Link). setLabel("Forum"). setURL("https://forum.nhcarrigan.com"), ), ]; // Config for the acknowledgment button /** * Creates an acknowledgment button for alt-text reminders. * @param userId - The ID of the user who can acknowledge the reminder. * @returns An array containing an ActionRow with the acknowledgment button. */ const createAckButton = ( userId: string, ): Array> => { const button = new ButtonBuilder(). setCustomId(`ack-${userId}`). setLabel("Got it!"). setStyle(ButtonStyle.Secondary). setEmoji("✅"); const actionRow = new ActionRowBuilder(). addComponents(button); return [ actionRow ]; }; const replyForUnauthorized = "❌ This button is only for the person who received the reminder."; export { blocks, createAckButton, replyForUnauthorized };