import type { PrismaClient } from '@prisma/client';
import type {
  ChatInputCommandInteraction,
  Client,
  MessageContextMenuCommandInteraction
} from 'discord.js';
import type { Redis } from 'ioredis';

export type BotContext = {
  client: Client;
  prisma: PrismaClient;
  redis: Redis;
};

export type SlashCommand = {
  data: { name: string; toJSON: () => unknown };
  execute: (interaction: ChatInputCommandInteraction, context: BotContext) => Promise<void>;
};

export type ContextMenuCommand = {
  data: { name: string; toJSON: () => unknown };
  execute: (
    interaction: MessageContextMenuCommandInteraction,
    context: BotContext
  ) => Promise<void>;
};
