From 41f07812836f7e57cbdf21b65e96156e77e01866 Mon Sep 17 00:00:00 2001 From: Agatha Rose Date: Tue, 31 Jul 2018 18:54:26 +0300 Subject: [PATCH] Fix list_srv command --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 5e9217b..bc769d2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -93,10 +93,12 @@ command!(list_srv(_ctx, message) { } */ use serenity::CACHE; let cache = CACHE.read(); + let mut list = String::new(); for (index, guild_lock) in cache.guilds.values().enumerate() { let guild = guild_lock.read(); - let _ = message.channel_id.say(format!("{}: {}", index, guild.name)); + list.push_str("{}: {}\n", index, guild.name); } + let _ = message.channel_id.say(format!("{}", list)); } });