feat: add analytics, fix mcp logic
Node.js CI / Lint and Test (push) Successful in 1m39s

This commit is contained in:
2025-10-09 20:36:39 -07:00
parent c8bd129c0f
commit 5bd6e03a8d
6 changed files with 86 additions and 9 deletions
+5
View File
@@ -5,6 +5,7 @@
*/
import { about } from "../commands/about.js";
import { dm } from "../commands/dm.js";
import { logger } from "../utils/logger.js";
import type { Command } from "../interfaces/command.js";
import type { ChatInputCommandInteraction, Client } from "discord.js";
@@ -32,6 +33,10 @@ const chatInputInteractionCreate = async(
// eslint-disable-next-line no-underscore-dangle -- We use _default as a fallback handler.
const handler = handlers[name] ?? handlers._default;
await handler(hikari, interaction);
await logger.metric("interaction_create", 1, {
command: name,
guild: interaction.guild?.id ?? "unknown",
});
};
export { chatInputInteractionCreate };