aboutsummaryrefslogtreecommitdiff
path: root/src/bot.rs
diff options
context:
space:
mode:
authorNathan Perry <np@nathanperry.dev>2024-08-16 01:28:25 -0400
committerNathan Perry <np@nathanperry.dev>2024-08-16 01:29:31 -0400
commita435a926689b0b597caa1c724a91694f74dec778 (patch)
tree00085b30f013f969a511a1e1b1666e9c052cb8a6 /src/bot.rs
parentdabf532d8251063606f0ffcffb0faf5444c46a4a (diff)
windows: start postgres svc if not running
Diffstat (limited to 'src/bot.rs')
-rw-r--r--src/bot.rs5
1 files changed, 5 insertions, 0 deletions
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();