forked from Skynet/discord-bot
fix: better info on the servers
This commit is contained in:
parent
55b2e534d4
commit
acb6432129
1 changed files with 12 additions and 3 deletions
|
@ -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: <http://panel.games.skynet.ie/server/{id}>
|
||||
"#,
|
||||
name = &x.attributes.name,
|
||||
online = !x.attributes.is_suspended,
|
||||
description = &x.attributes.description,
|
||||
id = &x.attributes.identifier
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue