diff --git a/migrations/20230511125236_reminder_threads.sql b/migrations/20230511125236_reminder_threads.sql new file mode 100644 index 0000000..6dadba8 --- /dev/null +++ b/migrations/20230511125236_reminder_threads.sql @@ -0,0 +1,2 @@ +-- Add migration script here +ALTER TABLE reminders ADD COLUMN `thread_id` BIGINT DEFAULT NULL; diff --git a/src/main.rs b/src/main.rs index 173e758..58455cb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -90,6 +90,8 @@ async fn _main(tx: Sender<()>) -> Result<(), Box> { if Path::new("/etc/reminder-rs/config.env").exists() { dotenv::from_path("/etc/reminder-rs/config.env")?; + } else { + dotenv::from_path(".env")?; } let discord_token = env::var("DISCORD_TOKEN").expect("Missing DISCORD_TOKEN from environment");