From 97eb25fa436d8728457fc0b0340bdb8b3561abd6 Mon Sep 17 00:00:00 2001 From: Pop Flamingo Date: Wed, 26 Jul 2023 06:42:58 +0200 Subject: [PATCH] Fix stats keys (#54) - Uses new command name - Specifies wether the interaction was a command or a refresh button click --- commands/CommandStationRequest.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commands/CommandStationRequest.ts b/commands/CommandStationRequest.ts index 7886659..98d2c7f 100644 --- a/commands/CommandStationRequest.ts +++ b/commands/CommandStationRequest.ts @@ -56,7 +56,7 @@ export default class CommandStationRequest implements CommandDescriptor { let stationName = interaction.options.getString("station"); // Save some stats services.stats.increment( - "COMMAND(horaires,station)", + "COMMAND(horaires/command)", interaction.user.id ); @@ -282,6 +282,10 @@ export default class CommandStationRequest implements CommandDescriptor { interaction: ButtonInteraction, services: BotServices ): Promise => { + services.stats.increment( + "COMMAND(horaires/button)", + interaction.user.id + ); const path = interaction.customId let { name: readableName, value: station, locationDescription: locationDescription } = services.cts.getExtendedStationFromPath(path);