From acb6432129b3a9d0333a22ce876f6d32f4833ea4 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Mon, 3 Jun 2024 05:01:23 +0100 Subject: [PATCH] fix: better info on the servers --- src/commands/minecraft.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/commands/minecraft.rs b/src/commands/minecraft.rs index ae80ff3..d1e38f2 100644 --- a/src/commands/minecraft.rs +++ b/src/commands/minecraft.rs @@ -234,12 +234,21 @@ pub(crate) mod server { }; let config = config_lock.read().await; - let mut result = "|ID|Online|Name|Description|\n|:---|:---|:---|:---|".to_string(); + let mut result = "Server Information:\n".to_string(); for server in get_minecraft_config_server(&db, g_id).await { if let Some(x) = server_information(&server.minecraft, &config.discord_minecraft).await { result.push_str(&format!( - "\n|{}|{}|{}|{}|", - &x.attributes.identifier, !x.attributes.is_suspended, &x.attributes.name, &x.attributes.description + r#" + Name: {name} + ID: {id} + Online: {online} + Info: {description} + Link: + "#, + name = &x.attributes.name, + online = !x.attributes.is_suspended, + description = &x.attributes.description, + id = &x.attributes.identifier )); } }