.lsar formatting fix

This commit is contained in:
Master Kwoth 2017-06-13 03:09:01 +02:00
parent 6c2b497ff1
commit 48fff57d7a

View File

@ -109,12 +109,11 @@ namespace NadekoBot.Modules.Administration
{ {
var toRemove = new ConcurrentHashSet<SelfAssignedRole>(); var toRemove = new ConcurrentHashSet<SelfAssignedRole>();
var removeMsg = new StringBuilder(); var removeMsg = new StringBuilder();
var msg = new StringBuilder(); var roles = new List<string>();
var roleCnt = 0; var roleCnt = 0;
using (var uow = _db.UnitOfWork) using (var uow = _db.UnitOfWork)
{ {
var roleModels = uow.SelfAssignedRoles.GetFromGuild(Context.Guild.Id).ToList(); var roleModels = uow.SelfAssignedRoles.GetFromGuild(Context.Guild.Id).ToList();
msg.AppendLine();
foreach (var roleModel in roleModels) foreach (var roleModel in roleModels)
{ {
@ -126,7 +125,7 @@ namespace NadekoBot.Modules.Administration
} }
else else
{ {
msg.Append($"**{role.Name}**, "); roles.Add(Format.Bold(role.Name));
roleCnt++; roleCnt++;
} }
} }
@ -136,7 +135,7 @@ namespace NadekoBot.Modules.Administration
} }
await uow.CompleteAsync(); await uow.CompleteAsync();
} }
await Context.Channel.SendConfirmAsync(GetText("self_assign_list", roleCnt), msg + "\n\n" + removeMsg).ConfigureAwait(false); await Context.Channel.SendConfirmAsync(GetText("self_assign_list", roleCnt), "\n" + string.Join(", ", roles) + "\n\n" + removeMsg).ConfigureAwait(false);
} }
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]