Add new features for giveaways, tickets, self-roles, tags, starboard, suggestions, and birthdays

- Integrated new command modules for managing giveaways, tickets, self-roles, tags, starboard, suggestions, and birthdays, enhancing the bot's capabilities.
- Implemented job handling for giveaway endings, ticket management, and birthday role expirations, improving automation and user experience.
- Updated command definitions and interaction handling to support new features, ensuring smooth user interactions.
- Enhanced the job processing system with dedicated workers for managing various tasks, including auto-closing tickets and running birthday checks.
- Documented the new features and their setup processes in PHASE-TRACKING.md for clarity on implementation steps.
This commit is contained in:
smueller
2026-07-22 13:21:28 +02:00
parent 1ceb8c3574
commit 52b10c9536
11 changed files with 271 additions and 90 deletions

View File

@@ -333,7 +333,7 @@ async function fetchTicketMessages(
}
}
function buildRatingComponents(ticketId: string, locale: 'de' | 'en'): ActionRowBuilder<ButtonBuilder> {
function buildRatingComponents(ticketId: string): ActionRowBuilder<ButtonBuilder> {
const row = new ActionRowBuilder<ButtonBuilder>();
for (let rating = 1; rating <= 5; rating += 1) {
row.addComponents(
@@ -704,7 +704,7 @@ export async function closeTicket(
try {
await opener.send({
content: t(locale, 'ticket.ratePrompt'),
components: [buildRatingComponents(ticket.id, locale)]
components: [buildRatingComponents(ticket.id)]
});
} catch {
// User may have DMs disabled
@@ -729,8 +729,7 @@ export async function rateTicket(
context: BotContext,
ticketId: string,
userId: string,
rating: number,
locale: 'de' | 'en'
rating: number
): Promise<void> {
const ticket = await context.prisma.ticket.findUnique({ where: { id: ticketId } });
if (!ticket || ticket.openerId !== userId) {