You've already forked AstralRinth
forked from didirus/AstralRinth
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user