From 854cd0626bd115693dfceba6cb34586c0ad72812 Mon Sep 17 00:00:00 2001 From: Noi Date: Wed, 31 Aug 2022 21:13:41 -0700 Subject: [PATCH] Remove unneeded TODOs A better logging implementation is no longer planned for now, as the current method has proven to be sufficient so far. It may even continue to be so for a while. --- ApplicationCommands/ModalResponder.cs | 1 - BackgroundServices/BirthdayRoleUpdate.cs | 2 +- ShardInstance.cs | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/ApplicationCommands/ModalResponder.cs b/ApplicationCommands/ModalResponder.cs index 236421d..15288b2 100644 --- a/ApplicationCommands/ModalResponder.cs +++ b/ApplicationCommands/ModalResponder.cs @@ -27,7 +27,6 @@ static class ModalResponder { await handler(arg, channel, data).ConfigureAwait(false); } catch (Exception e) { inst.Log(nameof(ModalResponder), $"Unhandled exception. {e}"); - // TODO when implementing proper application error logging, see here await arg.RespondAsync(ShardInstance.InternalError); } } diff --git a/BackgroundServices/BirthdayRoleUpdate.cs b/BackgroundServices/BirthdayRoleUpdate.cs index e97906f..d907932 100644 --- a/BackgroundServices/BirthdayRoleUpdate.cs +++ b/BackgroundServices/BirthdayRoleUpdate.cs @@ -111,7 +111,7 @@ class BirthdayRoleUpdate : BackgroundService { private static async Task> UpdateGuildBirthdayRoles(SocketGuild g, SocketRole r, HashSet toApply) { var additions = new List(); try { - var removals = new List(); // TODO check if roles can be removed in-place instead of building a list first + var removals = new List(); var no_ops = new HashSet(); // Scan role for members no longer needing it diff --git a/ShardInstance.cs b/ShardInstance.cs index 0ab8cad..ccd4cc5 100644 --- a/ShardInstance.cs +++ b/ShardInstance.cs @@ -127,7 +127,6 @@ public sealed class ShardInstance : IDisposable { await _interactionService.ExecuteCommandAsync(context, _services).ConfigureAwait(false); } catch (Exception e) { Log(nameof(DiscordClient_InteractionCreated), $"Unhandled exception. {e}"); - // TODO when implementing proper application error logging, see here if (arg.Type == InteractionType.ApplicationCommand) { if (arg.HasResponded) await arg.ModifyOriginalResponseAsync(prop => prop.Content = InternalError); else await arg.RespondAsync(InternalError); @@ -161,7 +160,6 @@ public sealed class ShardInstance : IDisposable { await context.Interaction.RespondAsync(errReply, ephemeral: true).ConfigureAwait(false); } else { // Generic error response - // TODO when implementing proper application error logging, see here var ia = context.Interaction; if (ia.HasResponded) await ia.ModifyOriginalResponseAsync(p => p.Content = InternalError).ConfigureAwait(false); else await ia.RespondAsync(InternalError).ConfigureAwait(false);