From 94104898e25412bad519d11bd8cb127e49e5dc40 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Fri, 28 Jul 2023 16:07:13 +0100 Subject: [PATCH 1/3] chore: bump to 1.8.1 --- SuggestionBot/SuggestionBot.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SuggestionBot/SuggestionBot.csproj b/SuggestionBot/SuggestionBot.csproj index 2568f64..3a13785 100644 --- a/SuggestionBot/SuggestionBot.csproj +++ b/SuggestionBot/SuggestionBot.csproj @@ -6,7 +6,7 @@ enable enable Linux - 1.8.0 + 1.8.1 From 55af735a52d7bf6ba2b102d2843dc311695fb611 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Fri, 28 Jul 2023 16:07:22 +0100 Subject: [PATCH 2/3] feat: don't delete threads for "Accepted" suggestions --- SuggestionBot/Services/SuggestionService.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/SuggestionBot/Services/SuggestionService.cs b/SuggestionBot/Services/SuggestionService.cs index ac5736a..1e125ad 100644 --- a/SuggestionBot/Services/SuggestionService.cs +++ b/SuggestionBot/Services/SuggestionService.cs @@ -693,11 +693,14 @@ public async Task UpdateSuggestionAsync(Suggestion suggestion) { await message.DeleteAllReactionsAsync().ConfigureAwait(false); - DiscordThreadChannel? thread = GetThread(suggestion); - if (thread is not null) + if (suggestion.Status != SuggestionStatus.Accepted) { - await thread.DeleteAsync("Suggestion closed").ConfigureAwait(false); - SetThread(suggestion, null); + DiscordThreadChannel? thread = GetThread(suggestion); + if (thread is not null) + { + await thread.DeleteAsync("Suggestion closed").ConfigureAwait(false); + SetThread(suggestion, null); + } } } } From 56431ff2412f1bef093b63a2f4b51a3ddadaa81f Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Fri, 28 Jul 2023 16:07:30 +0100 Subject: [PATCH 3/3] docs: update changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 669dbaa..e109ede 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.8.1] - 2023-07-28 + +### Changed + +- Threads are not deleted for Accepted suggestions. + ## [1.8.0] - 2023-07-28 ### Added @@ -141,6 +147,7 @@ implemented, accepted, or rejected. - Initial release. +[1.8.1]: https://github.com/BrackeysBot/SuggestionBot/releases/tag/v1.8.1 [1.8.0]: https://github.com/BrackeysBot/SuggestionBot/releases/tag/v1.8.0 [1.7.0]: https://github.com/BrackeysBot/SuggestionBot/releases/tag/v1.7.0 [1.6.3]: https://github.com/BrackeysBot/SuggestionBot/releases/tag/v1.6.3