updates to concierge bot to support adding services and routes

This commit is contained in:
JB
2026-02-12 19:25:01 -05:00
parent e9865d3ee8
commit 415aa3dbfe
86 changed files with 2396 additions and 723 deletions

View File

@@ -3,14 +3,14 @@ import { handleCommands } from './handle-commands';
import { CommandInteraction, Constants, ModalSubmitInteraction, type ApplicationCommandStructure } from '@projectdysnomia/dysnomia';
import { CommandHandler } from '../types';
let commands: Record<string, CommandHandler<ApplicationCommandStructure>>;
let commands: Map<string, CommandHandler<ApplicationCommandStructure>>;
beforeEach(() => {
commands = {};
commands = new Map();
});
afterEach(() => {
commands = {};
commands = new Map();
});
mock.module('./command-helpers', () => ({
@@ -20,7 +20,7 @@ mock.module('./command-helpers', () => ({
test('handleCommands executes command when interaction is CommandInteraction and command exists', async () => {
const mockExecute = mock(() => Promise.resolve());
const mockCommand = { definition: { name: 'testCommand' } as any, execute: mockExecute };
commands['testCommand'] = mockCommand;
commands.set('testCommand', mockCommand);
const mockInteraction = {
type: Constants.InteractionTypes.APPLICATION_COMMAND,
@@ -36,7 +36,7 @@ test('handleCommands executes command when interaction is CommandInteraction and
test('handleCommands executes command when interaction is CommandInteraction and command exists', async () => {
const mockExecute = mock(() => Promise.resolve());
const mockCommand = { definition: { name: 'testCommand' } as any, execute: mockExecute };
commands['testCommand'] = mockCommand;
commands.set('testCommand', mockCommand);
const mockInteraction = {
type: Constants.InteractionTypes.MODAL_SUBMIT,