card-drop/tests/__functions__/discord.js/GenerateCommandInteractionMock.ts
Ethan Lane 2bf961d1e5
All checks were successful
Test / build (push) Successful in 53s
Upgrade discord.js
2025-06-19 19:14:40 +01:00

17 lines
No EOL
501 B
TypeScript

import { ChatInputCommandInteraction } from "../../__types__/discord.js";
export default function GenerateCommandInteractionMock(options?: {
subcommand?: string,
}): ChatInputCommandInteraction{
return {
deferReply: jest.fn(),
editReply: jest.fn(),
isChatInputCommand: jest.fn().mockReturnValue(true),
options: {
getSubcommand: jest.fn().mockReturnValue(options?.subcommand),
},
user: {
id: "userId",
},
};
}