Skip to content

Commit 6f1272e

Browse files
committed
fix: missed some logs
1 parent 69dbee1 commit 6f1272e

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/Color-Chan.Discord.Commands/InteractionHandlers/BaseInteractionHandler.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,18 @@ protected InternalInteractionResponse GetInternalInteractionResponse(Result<IDis
4848
// Return the response.
4949
if (result.IsSuccessful)
5050
{
51-
logger.LogInformation("Interaction: {Id} : Slash command interaction returned successfully", interactionId.ToString());
51+
logger.LogInformation("Interaction: {Id} : Slash command interaction returned successfully", interactionId);
5252
return new InternalInteractionResponse(acknowledged, result.Entity!);
5353
}
5454

55-
logger.LogWarning("Interaction: {Id} : Slash command interaction returned unsuccessfully, reason: {ErrorReason}", interactionId.ToString(), result.ErrorResult?.ErrorMessage);
55+
logger.LogWarning("Interaction: {Id} : Slash command interaction returned unsuccessfully, reason: {ErrorReason}", interactionId, result.ErrorResult?.ErrorMessage);
5656
if (sendDefaultErrorMessage)
5757
{
58-
logger.LogWarning("Interaction: {Id} : Sending default error message", interactionId.ToString());
58+
logger.LogWarning("Interaction: {Id} : Sending default error message", interactionId);
5959
return new InternalInteractionResponse(acknowledged, new InteractionResponseBuilder().DefaultErrorMessage());
6060
}
6161

62-
logger.LogError("Interaction: {Id} : Failed to handle interaction command, reason: {ErrorReason}", interactionId.ToString(), result.ErrorResult?.ErrorMessage);
62+
logger.LogError("Interaction: {Id} : Failed to handle interaction command, reason: {ErrorReason}", interactionId, result.ErrorResult?.ErrorMessage);
6363
throw new InteractionResultException($"Command request {interactionId} returned unsuccessfully, {result.ErrorResult?.ErrorMessage}");
6464
}
6565

@@ -82,11 +82,11 @@ protected async Task<bool> AcknowledgedIfRequiredAsync(IDiscordInteraction inter
8282
var acknowledgeResult = await restApplication.CreateInteractionResponseAsync(interaction.Id, interaction.Token, acknowledgeResponse).ConfigureAwait(false);
8383
if (!acknowledgeResult.IsSuccessful)
8484
{
85-
logger.LogWarning("Interaction: {Id} : Failed to acknowledge interaction command, reason: {Message}", interaction.Id.ToString(), acknowledgeResult.ErrorResult?.ErrorMessage);
85+
logger.LogWarning("Interaction: {Id} : Failed to acknowledge interaction command, reason: {Message}", interaction.Id, acknowledgeResult.ErrorResult?.ErrorMessage);
8686
return false;
8787
}
8888

89-
logger.LogDebug("Interaction: {Id} : Acknowledged interaction command", interaction.Id.ToString());
89+
logger.LogDebug("Interaction: {Id} : Acknowledged interaction command", interaction.Id);
9090
return true;
9191
}
9292

src/Color-Chan.Discord.Commands/InteractionHandlers/MessageComponentRequestHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private string GetCustomId(IDiscordInteraction interaction, IComponentContext co
8484
return customId;
8585
}
8686

87-
logger.LogDebug("Interaction: {Id} : Parsing custom id arguments", interaction.Id.ToString());
87+
logger.LogDebug("Interaction: {Id} : Parsing custom id arguments", interaction.Id);
8888
var customIdData = context.Data.CustomId!.Split(config.Value.CustomIdDataSeparator).ToList();
8989
customId = customIdData.First();
9090

0 commit comments

Comments
 (0)