Implement PlaceholderHelp component across various forms for enhanced user guidance
- Integrated PlaceholderHelp component into multiple forms including WelcomeForm, TagsManager, and StatsForm to provide contextual hints for available placeholders. - Updated DiscordEmbedBuilder to support placeholder presets, improving user experience when creating embeds. - Enhanced localization files to include new placeholder descriptions, ensuring clarity in both English and German. - Refactored related components to maintain consistency in placeholder handling across the application.
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
type MessageCreateOptions,
|
||||
type TextChannel
|
||||
} from 'discord.js';
|
||||
import { WelcomeEmbedSchema, t, tf } from '@nexumi/shared';
|
||||
import { WelcomeEmbedSchema, expandBracketChannelMentions, t, tf } from '@nexumi/shared';
|
||||
import type { ScheduledMessage } from '@prisma/client';
|
||||
import { ensureGuild } from '../../guild.js';
|
||||
import { logger } from '../../logger.js';
|
||||
@@ -99,15 +99,15 @@ export function buildAnnouncementPayload(schedule: {
|
||||
if (embedData) {
|
||||
const embed = new EmbedBuilder().setColor(embedData.color ?? 0x6366f1);
|
||||
if (embedData.title) {
|
||||
embed.setTitle(embedData.title);
|
||||
embed.setTitle(expandBracketChannelMentions(embedData.title));
|
||||
}
|
||||
if (embedData.description) {
|
||||
embed.setDescription(embedData.description);
|
||||
embed.setDescription(expandBracketChannelMentions(embedData.description));
|
||||
}
|
||||
embeds.push(embed);
|
||||
}
|
||||
|
||||
const baseContent = schedule.content?.trim() ?? '';
|
||||
const baseContent = expandBracketChannelMentions(schedule.content?.trim() ?? '');
|
||||
const roleMention = schedule.rolePingId ? `<@&${schedule.rolePingId}>` : '';
|
||||
const content = [roleMention, baseContent].filter(Boolean).join(' ').trim();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user