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]]
name = "mini_admin_bot"
version = "0.1.0"
version = "0.2.5"
dependencies = [
"anyhow",
"chrono",

View File

@ -1,10 +1,9 @@
[package]
name = "mini_admin_bot"
version = "0.1.0"
version = "0.2.5"
edition = "2018"
[dependencies]
#teloxide = { version = "0.11.3", features = ["macros", "auto-send"] }
teloxide = { version = "0.12", features = ["macros", "auto-send"] }
futures = "0.3.5"
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?
}
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(())