Skip to content

Commit 4add437

Browse files
committed
fix(playmatch): correct dm text based on type for suggestion approval
1 parent 7f75be5 commit 4add437

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

src/command/playmatch.rs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -837,14 +837,25 @@ async fn handle_suggestion_message(data: SuggestionMessageHandleData) -> Command
837837
.approve_suggestion(&data.suggestion_id)
838838
.await?;
839839

840+
let message = match data.r#type {
841+
SuggestionType::Platform => format!(
842+
"Your Playmatch Metadata Suggestion for {display_type} **{}** was approved! Thank you very much for your contribution 🎉!",
843+
data.name
844+
),
845+
SuggestionType::Company => format!(
846+
"Your Playmatch Metadata Suggestion for {display_type} **{}** was approved! Thank you very much for your contribution 🎉!",
847+
data.name
848+
),
849+
SuggestionType::Game => format!(
850+
"Your Playmatch Metadata Suggestion for {display_type} **{}**{} was approved! Playmatch was able to match {} game(s) thanks to this! Thank you very much for your contribution 🎉!",
851+
data.name, platform_text, updated.updated
852+
),
853+
};
854+
840855
author
841856
.dm(
842857
&data.http,
843-
CreateMessage::new().embed(
844-
CreateEmbed::new().description(
845-
format!("Your Playmatch Metadata Suggestion for {display_type} **{}**{} was approved! Playmatch was able to match {} game(s) thanks to you. Thank you very much for your contribution 🎉!", data.name, platform_text, updated.updated)
846-
),
847-
),
858+
CreateMessage::new().embed(CreateEmbed::new().description(message)),
848859
)
849860
.await?;
850861
}

0 commit comments

Comments
 (0)