@@ -74,6 +74,7 @@ public DiscordEmbed CreatePrivateEmbed(Suggestion suggestion)
7474 SuggestionStatus . Suggested => "🗳️" ,
7575 SuggestionStatus . Rejected => "❌" ,
7676 SuggestionStatus . Implemented => "✅" ,
77+ SuggestionStatus . Accepted => "✅" ,
7778 _ => throw new ArgumentOutOfRangeException ( nameof ( suggestion ) , suggestion . Status , null )
7879 } ;
7980
@@ -89,6 +90,7 @@ public DiscordEmbed CreatePrivateEmbed(Suggestion suggestion)
8990 SuggestionStatus . Suggested => configuration . SuggestedColor ,
9091 SuggestionStatus . Rejected => configuration . RejectedColor ,
9192 SuggestionStatus . Implemented => configuration . ImplementedColor ,
93+ SuggestionStatus . Accepted => configuration . AcceptedColor ,
9294 _ => throw new ArgumentOutOfRangeException ( nameof ( suggestion ) , suggestion . Status , null )
9395 } ) ;
9496
@@ -136,6 +138,7 @@ public DiscordEmbed CreatePublicEmbed(Suggestion suggestion)
136138 SuggestionStatus . Suggested => "🗳️" ,
137139 SuggestionStatus . Rejected => "❌" ,
138140 SuggestionStatus . Implemented => "✅" ,
141+ SuggestionStatus . Accepted => "✅" ,
139142 _ => throw new ArgumentOutOfRangeException ( nameof ( suggestion ) , suggestion . Status , null )
140143 } ;
141144
@@ -152,6 +155,7 @@ public DiscordEmbed CreatePublicEmbed(Suggestion suggestion)
152155 SuggestionStatus . Suggested => configuration . SuggestedColor ,
153156 SuggestionStatus . Rejected => configuration . RejectedColor ,
154157 SuggestionStatus . Implemented => configuration . ImplementedColor ,
158+ SuggestionStatus . Accepted => configuration . AcceptedColor ,
155159 _ => throw new ArgumentOutOfRangeException ( nameof ( suggestion ) , suggestion . Status , null )
156160 } ) ;
157161
@@ -317,42 +321,6 @@ public Uri GetSuggestionLink(Suggestion suggestion)
317321 return new Uri ( $ "https://discord.com/channels/{ guildId } /{ configuration ? . SuggestionChannel } /{ messageId } ") ;
318322 }
319323
320- /// <summary>
321- /// Marks a suggestion as implemented, and optionally updates the remarks for the implementation.
322- /// </summary>
323- /// <param name="suggestion">The suggestion to update.</param>
324- /// <param name="staffMember">The staff member who implemented the suggestion.</param>
325- /// <returns><see langword="true" /> if the status was updated; otherwise, <see langword="false" />.</returns>
326- /// <exception cref="ArgumentNullException">
327- /// <para><paramref name="suggestion" /> is <see langword="null" />.</para>
328- /// -or-
329- /// <para><paramref name="staffMember" /> is <see langword="null" />.</para>
330- /// </exception>
331- public bool Implement ( Suggestion suggestion , DiscordMember staffMember )
332- {
333- if ( suggestion is null )
334- {
335- throw new ArgumentNullException ( nameof ( suggestion ) ) ;
336- }
337-
338- if ( staffMember is null )
339- {
340- throw new ArgumentNullException ( nameof ( staffMember ) ) ;
341- }
342-
343- if ( ! SetStatus ( suggestion , SuggestionStatus . Implemented , staffMember ) )
344- {
345- return false ;
346- }
347-
348- _logger . LogInformation ( "{StaffMember} marked suggestion {Id} as IMPLEMENTED" , staffMember , suggestion . Id ) ;
349-
350- using SuggestionContext context = _contextFactory . CreateDbContext ( ) ;
351- context . Suggestions . Update ( suggestion ) ;
352- context . SaveChanges ( ) ;
353- return true ;
354- }
355-
356324 /// <summary>
357325 /// Posts a suggestion to the suggestion channel of the guild in which it was made.
358326 /// </summary>
@@ -396,42 +364,6 @@ public bool Implement(Suggestion suggestion, DiscordMember staffMember)
396364 return message ;
397365 }
398366
399- /// <summary>
400- /// Marks a suggestion as rejected, and updates the reason for the rejection if one is provided.
401- /// </summary>
402- /// <param name="suggestion">The suggestion to update.</param>
403- /// <param name="staffMember">The staff member who rejected the suggestion.</param>
404- /// <returns><see langword="true" /> if the status was updated; otherwise, <see langword="false" />.</returns>
405- /// <exception cref="ArgumentNullException">
406- /// <para><paramref name="suggestion" /> is <see langword="null" />.</para>
407- /// -or-
408- /// <para><paramref name="staffMember" /> is <see langword="null" />.</para>
409- /// </exception>
410- public bool Reject ( Suggestion suggestion , DiscordMember staffMember )
411- {
412- if ( suggestion is null )
413- {
414- throw new ArgumentNullException ( nameof ( suggestion ) ) ;
415- }
416-
417- if ( staffMember is null )
418- {
419- throw new ArgumentNullException ( nameof ( staffMember ) ) ;
420- }
421-
422- if ( ! SetStatus ( suggestion , SuggestionStatus . Rejected , staffMember ) )
423- {
424- return false ;
425- }
426-
427- _logger . LogInformation ( "{StaffMember} marked suggestion {Id} as REJECTED" , staffMember , suggestion . Id ) ;
428-
429- using SuggestionContext context = _contextFactory . CreateDbContext ( ) ;
430- context . Suggestions . Update ( suggestion ) ;
431- context . SaveChanges ( ) ;
432- return true ;
433- }
434-
435367 /// <summary>
436368 /// Sets the message of a suggestion.
437369 /// </summary>
@@ -503,6 +435,9 @@ public bool SetStatus(Suggestion suggestion, SuggestionStatus status, DiscordMem
503435 context . Suggestions . Update ( suggestion ) ;
504436 context . SaveChanges ( ) ;
505437
438+ _logger . LogInformation ( "{StaffMember} marked suggestion {Id} as {Status}" , staffMember , suggestion . Id ,
439+ humanizedStatus ) ;
440+
506441 _ = UpdateSuggestionAsync ( suggestion ) ;
507442 return true ;
508443 }
0 commit comments