From a435a926689b0b597caa1c724a91694f74dec778 Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Fri, 16 Aug 2024 01:28:25 -0400 Subject: windows: start postgres svc if not running --- src/bot.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/bot.rs') diff --git a/src/bot.rs b/src/bot.rs index 4942c98..b74bf0d 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -364,6 +364,11 @@ fn after_handle(ctx: PoiseContext) -> BoxFuture<()> { } pub async fn run() -> anyhow::Result<()> { + #[cfg(all(windows, feature = "windows_autostart_postgres"))] + unsafe { + crate::windows_util::ensure_postgres_started()?; + }; + let token = &CONFIG.discord.auth.token; let sb_config = songbird::Config::default(); -- cgit v1.3.1