Store messages into table, required docker container to create table

This commit is contained in:
Benjamin Sherriff
2023-07-06 22:44:48 -04:00
parent 9a8587e4b8
commit 4a366d6237
11 changed files with 115 additions and 51 deletions

View File

@@ -36,7 +36,7 @@ impl EventHandler for Handler {
match msg.mentions_me(&ctx.http).await {
Ok(mentioned) => {
if mentioned {
commands::oai::generate_response(&ctx, &msg, oai).await;
commands::oai::generate_response(&ctx, &msg, oai, &self.pool).await;
}
}
Err(why) => warn!("Could not check mentions: {:?}", why)
@@ -116,7 +116,7 @@ async fn main() {
};
let pool = database::establish_connection();
database::run_migrations(&pool);
// database::run_migrations(&pool);
let handler = match env::var("OPENAI_API_KEY") {
Ok(token) => {