testing purposes

This commit is contained in:
mykola2312 2024-03-31 16:37:57 +03:00
parent 977f8839a5
commit 6ac64055cc

View file

@ -137,8 +137,14 @@ enum Command {
DeclineChat(String), DeclineChat(String),
} }
use crate::dl::spawn::spawn;
async fn cmd_test(bot: Bot, msg: Message, _db: DbPool) -> HandlerResult { async fn cmd_test(bot: Bot, msg: Message, _db: DbPool) -> HandlerResult {
//bot.send_message(msg.chat.id, t!("test_response")).await?; //bot.send_message(msg.chat.id, t!("test_response")).await?;
let output = spawn("python", &["-c", "import os; print(os.environ)"])
.await
.unwrap();
println!("{}", std::str::from_utf8(&output.stdout[0..4095]).unwrap());
Ok(()) Ok(())
} }