diff --git a/Delete.cs b/Delete.cs index 32aa08b..a098350 100644 --- a/Delete.cs +++ b/Delete.cs @@ -23,6 +23,11 @@ public class Delete var resp = await _cli.DeleteAsync($"https://discord.com/api/v9/channels/{msg.ChannelId}/messages/{msg.Id}"); Console.Write($"\x1b[2K\rRequest {cnt}/{_messages.Count} Status: {resp.StatusCode} [{(resp.IsSuccessStatusCode ? "OK" : "REPEATING")}] ... ({_messages.Count - cnt} left)"); + if ((int)resp.StatusCode / 100 == 4) + { + cnt++; + continue; + } if (!resp.IsSuccessStatusCode) { await Task.Delay(30000); diff --git a/Disforget.csproj b/Disforget.csproj index c58d21f..b7b9896 100644 --- a/Disforget.csproj +++ b/Disforget.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 enable enable true