Initial python groundwork
This commit is contained in:
@@ -38,4 +38,8 @@ features = ["json", "rustls-tls"]
|
|||||||
[dependencies.diesel]
|
[dependencies.diesel]
|
||||||
version = "2.1.0"
|
version = "2.1.0"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["postgres", "32-column-tables", "serde_json", "r2d2", "with-deprecated"]
|
features = ["postgres", "32-column-tables", "serde_json", "r2d2", "with-deprecated"]
|
||||||
|
|
||||||
|
[dependencies.pyo3]
|
||||||
|
version = "0.19.1"
|
||||||
|
features = ["auto-initialize"]
|
||||||
|
|||||||
3
Makefile
3
Makefile
@@ -21,6 +21,9 @@ build: ## Build the docker image
|
|||||||
test: ## Run the docker app as a container
|
test: ## Run the docker app as a container
|
||||||
docker run --env-file .env -it --rm --name siren siren:${SIREN_VERSION}
|
docker run --env-file .env -it --rm --name siren siren:${SIREN_VERSION}
|
||||||
|
|
||||||
|
db: ## Start the docker database
|
||||||
|
docker compose up -d db
|
||||||
|
|
||||||
up: ## Start the app
|
up: ## Start the app
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
|
|
||||||
|
|||||||
4
build.rs
Normal file
4
build.rs
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
fn main() {
|
||||||
|
let home = std::env::var("HOME").expect("${HOME} is missing");
|
||||||
|
println!("cargo:rustc-env=LD_LIBRARY_PATH={home}/.pyenv/versions/3.11.4/lib");
|
||||||
|
}
|
||||||
@@ -45,7 +45,6 @@ impl EventHandler for Handler {
|
|||||||
}
|
}
|
||||||
Err(_) => false
|
Err(_) => false
|
||||||
};
|
};
|
||||||
// let has_bot = msg.channel_id.get_thread_members(&ctx.http).await.unwrap().contains(ctx.cache.current_user_id().0);
|
|
||||||
if mentioned || bot_in_thread {
|
if mentioned || bot_in_thread {
|
||||||
commands::oai::generate_response(&ctx, &msg, oai, &self.pool).await;
|
commands::oai::generate_response(&ctx, &msg, oai, &self.pool).await;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user