Added missing files

main
Joey Hines 2024-03-09 10:48:44 -07:00
parent 889e5c338d
commit 68de77f97a
No known key found for this signature in database
GPG Key ID: 995E531F7A569DDB
3 changed files with 2754 additions and 0 deletions

2717
Cargo.lock generated 100644

File diff suppressed because it is too large Load Diff

19
Cargo.toml 100644
View File

@ -0,0 +1,19 @@
[package]
name = "daemon"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
systemctl = "0.3.1"
poise = "0.6.1"
config = "0.14.0"
j_db = { version = "0.1.2", registry = "jojo-dev" }
serde = "1.0.197"
structopt = "0.3.26"
env_logger = "0.11.3"
[dependencies.tokio]
version = "1.36.0"
features = ["rt-multi-thread"]

18
src/main.rs 100644
View File

@ -0,0 +1,18 @@
use crate::config::{Args, DaemonConfig};
use crate::discord::run_bot;
use j_db::database::Database;
use structopt::StructOpt;
mod config;
mod discord;
mod models;
#[tokio::main]
async fn main() {
env_logger::init();
let args = Args::from_args();
let config = DaemonConfig::new(args.config_path);
let db = Database::new(&config.db_path).unwrap();
run_bot(db, config).await;
}