Skip to content

Commit

Permalink
Clean up logging thanks to discordjs/discord.js#10516 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinlul committed Oct 4, 2024
1 parent ee0368f commit 57b76d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,8 @@ CREATE TABLE IF NOT EXISTS "searches2" (
interaction.channelId,
interaction.channel?.type,
interaction.user.id,
"context" in interaction ? interaction.context : null,
"authorizingIntegrationOwners" in interaction
? JSON.stringify(interaction.authorizingIntegrationOwners)
: null,
interaction.context,
JSON.stringify(interaction.authorizingIntegrationOwners),
interaction.commandName,
interaction.type,
interaction.commandType,
Expand Down
6 changes: 2 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ export function serialiseInteraction(
id: interaction.commandId,
command: interaction.commandName,
channelType: interaction.channel?.type,
...("context" in interaction && {
context: interaction.context,
authorizingIntegrationOwners: interaction.authorizingIntegrationOwners
}),
context: interaction.context,
authorizingIntegrationOwners: interaction.authorizingIntegrationOwners,
...extras
});
}
Expand Down

0 comments on commit 57b76d0

Please sign in to comment.