generated from nhcarrigan/template
forgot to use lint
This commit is contained in:
+24
-15
@@ -14,7 +14,7 @@ import {
|
||||
ActionRowBuilder,
|
||||
} from "discord.js";
|
||||
|
||||
export const blocks = [
|
||||
const blocks = [
|
||||
new ContainerBuilder().
|
||||
addTextDisplayComponents(
|
||||
new TextDisplayBuilder().setContent("# About Altaria"),
|
||||
@@ -65,20 +65,29 @@ export const blocks = [
|
||||
),
|
||||
];
|
||||
|
||||
// config for the acknowledgment button
|
||||
// Config for the acknowledgment button
|
||||
|
||||
export const createAckButton = (userId: string) => {
|
||||
const button = new ButtonBuilder()
|
||||
.setCustomId(`ack-${userId}`)
|
||||
.setLabel("Got it!")
|
||||
.setStyle(ButtonStyle.Secondary)
|
||||
.setEmoji("✅");
|
||||
/**
|
||||
* 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<ActionRowBuilder<ButtonBuilder>> => {
|
||||
const button = new ButtonBuilder().
|
||||
setCustomId(`ack-${userId}`).
|
||||
setLabel("Got it!").
|
||||
setStyle(ButtonStyle.Secondary).
|
||||
setEmoji("✅");
|
||||
|
||||
|
||||
const actionRow = new ActionRowBuilder<ButtonBuilder>()
|
||||
.addComponents(button);
|
||||
const actionRow = new ActionRowBuilder<ButtonBuilder>().
|
||||
addComponents(button);
|
||||
|
||||
return [actionRow];
|
||||
};
|
||||
|
||||
export const replyForUnauthorized = "❌ This button is only for the person who received the reminder.";
|
||||
return [ actionRow ];
|
||||
};
|
||||
|
||||
const replyForUnauthorized
|
||||
= "❌ This button is only for the person who received the reminder.";
|
||||
|
||||
export { blocks, createAckButton, replyForUnauthorized };
|
||||
|
||||
Reference in New Issue
Block a user