Fix list_srv command
This commit is contained in:
parent
32c98bf691
commit
41f0781283
|
@ -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));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue