generated from nhcarrigan/template
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user