Fix list_srv command

This commit is contained in:
Agatha Rose 2018-07-31 18:54:26 +03:00
parent 32c98bf691
commit 41f0781283
1 changed files with 3 additions and 1 deletions

View File

@ -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));
}
});