feat: initial Papo bot scaffold
This commit is contained in:
5
src/utils/logger.ts
Normal file
5
src/utils/logger.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export const logger = {
|
||||
info: (msg: string) => console.log(`[INFO] ${msg}`),
|
||||
warn: (msg: string) => console.warn(`[WARN] ${msg}`),
|
||||
error: (msg: string, err?: unknown) => console.error(`[ERROR] ${msg}`, err)
|
||||
};
|
||||
43
src/utils/types.ts
Normal file
43
src/utils/types.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { SlashCommandBuilder, ChatInputCommandInteraction, PermissionResolvable, Client } from 'discord.js';
|
||||
|
||||
export interface SlashCommand {
|
||||
data: SlashCommandBuilder;
|
||||
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: 'open' | 'in-progress' | 'closed';
|
||||
claimedBy?: string;
|
||||
transcript?: string;
|
||||
}
|
||||
|
||||
export interface ForumUser {
|
||||
discordId: string;
|
||||
forumUserId: string;
|
||||
username?: string;
|
||||
}
|
||||
|
||||
export interface ForumRoleSync {
|
||||
discordRoleId: string;
|
||||
forumRoleId: string;
|
||||
}
|
||||
|
||||
export interface ForumTicketLink {
|
||||
ticketId: string;
|
||||
forumThreadId?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user