get version from Cargo.toml

This commit is contained in:
Guillermo Roche 2025-05-11 22:04:51 +02:00
parent 87ad83f473
commit 7903e2baf4
Signed by: groche97
GPG Key ID: 041FB85BEEA4B9B0
4 changed files with 6 additions and 4 deletions

2
Cargo.lock generated
View File

@ -1145,7 +1145,7 @@ dependencies = [
[[package]] [[package]]
name = "mini_admin_bot" name = "mini_admin_bot"
version = "0.1.0" version = "0.2.5"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",

View File

@ -1,10 +1,9 @@
[package] [package]
name = "mini_admin_bot" name = "mini_admin_bot"
version = "0.1.0" version = "0.2.5"
edition = "2018" edition = "2018"
[dependencies] [dependencies]
#teloxide = { version = "0.11.3", features = ["macros", "auto-send"] }
teloxide = { version = "0.12", features = ["macros", "auto-send"] } teloxide = { version = "0.12", features = ["macros", "auto-send"] }
futures = "0.3.5" futures = "0.3.5"
log = "0.4" log = "0.4"

BIN
polesDB

Binary file not shown.

View File

@ -119,7 +119,10 @@ async fn answer(bot: Bot, msg: Message, command: Command) -> anyhow::Result<()>
) )
.await? .await?
} }
Command::Version => bot.send_message(msg.chat.id, "0.2.5").await?, Command::Version => {
bot.send_message(msg.chat.id, env!("CARGO_PKG_VERSION"))
.await?
}
}; };
Ok(()) Ok(())