Skip to content

Commit

Permalink
Fix stats keys (#54)
Browse files Browse the repository at this point in the history
- Uses new command name
- Specifies wether the interaction was a command or a refresh button click
  • Loading branch information
PopFlamingo authored Jul 26, 2023
1 parent 83eedf9 commit 97eb25f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion commands/CommandStationRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

Expand Down Expand Up @@ -282,6 +282,10 @@ export default class CommandStationRequest implements CommandDescriptor {
interaction: ButtonInteraction<CacheType>,
services: BotServices
): Promise<void> => {
services.stats.increment(
"COMMAND(horaires/button)",
interaction.user.id
);
const path = interaction.customId
let { name: readableName, value: station, locationDescription: locationDescription } =
services.cts.getExtendedStationFromPath(path);
Expand Down

0 comments on commit 97eb25f

Please sign in to comment.