From 55e388b01ab0170ac54f7af2d4bc7ed858a7673f Mon Sep 17 00:00:00 2001 From: jude Date: Tue, 13 Oct 2020 14:53:44 +0100 Subject: [PATCH] dp.py now statically built into the output binary --- src/commands/reminder_cmds.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/commands/reminder_cmds.rs b/src/commands/reminder_cmds.rs index 18ccf1a..221cad1 100644 --- a/src/commands/reminder_cmds.rs +++ b/src/commands/reminder_cmds.rs @@ -1004,7 +1004,8 @@ async fn natural(ctx: &Context, msg: &Message, args: String) -> CommandResult { if let (Some(time_crop), Some(msg_crop)) = (time_crop_opt, msg_crop_opt) { let python_call = Command::new(&*PYTHON_LOCATION) - .arg("dp.py") + .arg("-c") + .arg(include_str!("../../dp.py")) .arg(time_crop) .arg(&user_data.timezone) .arg(&*LOCAL_TIMEZONE) @@ -1063,7 +1064,8 @@ async fn natural(ctx: &Context, msg: &Message, args: String) -> CommandResult { let interval_str = captures.name("interval").unwrap().as_str(); let python_call = Command::new(&*PYTHON_LOCATION) - .arg("dp.py") + .arg("-c") + .arg(include_str!("../../dp.py")) .arg(&format!("1 {}", interval_str)) .arg(&*LOCAL_TIMEZONE) .arg(&*LOCAL_TIMEZONE)