Frontend: fix HeroUI Switch usage across the whole app (Content/Control/ Thumb composition was missing, so no toggle ever rendered visibly), replace raw channel/role ID text fields with proper name-based dropdowns (ChannelSelect/RoleSelect) backed by the existing /guild/resources endpoint, redesign Automod's filters as inline toggle rows, turn the Ticket Pipeline tab into a drag-and-drop Kanban board, narrow the sidebar further and rework its collapse toggle and profile footer, and add a Discord-style message preview for Welcome/Support Login. Backend: fix the ~50 TypeScript build errors blocking `npm run build` (SlashCommandBuilder typing, discord.js v14 channel-union guards, Prisma JSON null handling, logger.warn signature, and related type narrowing) so the project compiles cleanly again. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
51 lines
1.3 KiB
TypeScript
51 lines
1.3 KiB
TypeScript
import { SlashCommandBuilder, SlashCommandOptionsOnlyBuilder, SlashCommandSubcommandsOnlyBuilder, ChatInputCommandInteraction, PermissionResolvable, Client } from 'discord.js';
|
|
|
|
export interface SlashCommand {
|
|
data: SlashCommandBuilder | SlashCommandOptionsOnlyBuilder | SlashCommandSubcommandsOnlyBuilder;
|
|
execute: (interaction: ChatInputCommandInteraction, client: Client) => Promise<void>;
|
|
cooldown?: number;
|
|
requiredPermissions?: PermissionResolvable[];
|
|
guildOnly?: boolean;
|
|
}
|
|
|
|
export interface EventHandler {
|
|
name: string;
|
|
once?: boolean;
|
|
execute: (...args: any[]) => Promise<void> | void;
|
|
}
|
|
|
|
export interface TicketRecord {
|
|
id: string;
|
|
userId: string;
|
|
channelId: string;
|
|
guildId: string;
|
|
topic?: string;
|
|
priority?: 'low' | 'normal' | 'high';
|
|
status: TicketStatus;
|
|
claimedBy?: string;
|
|
transcript?: string;
|
|
firstClaimAt?: Date | null;
|
|
firstResponseAt?: Date | null;
|
|
kbSuggestionSentAt?: Date | null;
|
|
createdAt?: Date;
|
|
updatedAt?: Date;
|
|
}
|
|
|
|
export type TicketStatus = 'neu' | 'in_bearbeitung' | 'warten_auf_user' | 'erledigt' | 'open' | 'in-progress' | 'closed';
|
|
|
|
export interface ForumUser {
|
|
discordId: string;
|
|
forumUserId: string;
|
|
username?: string;
|
|
}
|
|
|
|
export interface ForumRoleSync {
|
|
discordRoleId: string;
|
|
forumRoleId: string;
|
|
}
|
|
|
|
export interface ForumTicketLink {
|
|
ticketId: string;
|
|
forumThreadId?: string;
|
|
}
|