feat: split out the minecraft script so it runs at 5am instead of regularly

This commit is contained in:
silver 2024-03-05 19:55:38 +00:00
parent 7e6d892b67
commit cf2c7683d2
4 changed files with 20 additions and 8 deletions

View file

@ -0,0 +1,14 @@
use skynet_discord_bot::{db_init, get_config, get_server_config_bulk, update_server};
#[tokio::main]
async fn main() {
let config = get_config();
let db = match db_init(&config).await {
Ok(x) => x,
Err(_) => return,
};
for server_config in get_server_config_bulk(&db).await {
update_server(server_config.server_minecraft, &db, &server_config.server, &config).await;
}
}