From 06064a8c9efffa71a8a619b1baa79cc3261c7cac Mon Sep 17 00:00:00 2001 From: Xyon Date: Thu, 24 Aug 2023 10:00:16 +0100 Subject: [PATCH] Emit composite version string when called --- src/commands/core.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/commands/core.rs b/src/commands/core.rs index e5a46cb..4d0c7bc 100644 --- a/src/commands/core.rs +++ b/src/commands/core.rs @@ -51,8 +51,7 @@ async fn set_activity(ctx: ManifoldContext<'_>, #[rest] #[description="Who to wa #[poise::command(slash_command, prefix_command)] async fn version(ctx: ManifoldContext<'_>) -> ManifoldResult<()> { - let git_info: String = built_info::GIT_VERSION.unwrap_or("unknown").to_string(); - let version_string: String = format!("Version {} built at {} revision {}", built_info::PKG_VERSION, built_info::BUILT_TIME_UTC, git_info); + let version_string = &ctx.data().version_string; ctx.send(|f| f .reply(true)