Queue Dates + Warnings, some cleanup (#549)

* Queue Dates + Warnings, some cleanup

* Fix ping

* Fix repeated discord messaging

* Fix compile error + run fmt
This commit is contained in:
Geometrically
2023-03-14 14:48:46 -07:00
committed by GitHub
parent 150329dd4a
commit 630a71c46c
23 changed files with 701 additions and 2212 deletions

View File

@@ -55,6 +55,7 @@ struct DiscordWebhook {
pub avatar_url: Option<String>,
pub username: Option<String>,
pub embeds: Vec<DiscordEmbed>,
pub content: Option<String>,
}
const PLUGIN_LOADERS: &[&str] = &[
@@ -72,6 +73,7 @@ pub async fn send_discord_webhook(
project_id: ProjectId,
pool: &PgPool,
webhook_url: String,
message: Option<String>,
) -> Result<(), ApiError> {
let all_game_versions = GameVersion::list(pool).await?;
@@ -257,6 +259,7 @@ pub async fn send_discord_webhook(
),
username: Some("Modrinth Release".to_string()),
embeds: vec![embed],
content: message,
})
.send()
.await