.lsar will now show if it cleans up some deleted roles, and show the proper count
This commit is contained in:
parent
78c3fbf55a
commit
515dfc1eb2
@ -108,7 +108,6 @@ namespace NadekoBot.Modules.Administration
|
||||
using (var uow = DbHandler.UnitOfWork())
|
||||
{
|
||||
var roleModels = uow.SelfAssignedRoles.GetFromGuild(Context.Guild.Id).ToList();
|
||||
roleCnt = roleModels.Count;
|
||||
msg.AppendLine();
|
||||
|
||||
foreach (var roleModel in roleModels)
|
||||
@ -116,11 +115,13 @@ namespace NadekoBot.Modules.Administration
|
||||
var role = Context.Guild.Roles.FirstOrDefault(r => r.Id == roleModel.RoleId);
|
||||
if (role == null)
|
||||
{
|
||||
toRemove.Add(roleModel);
|
||||
uow.SelfAssignedRoles.Remove(roleModel);
|
||||
}
|
||||
else
|
||||
{
|
||||
msg.Append($"**{role.Name}**, ");
|
||||
roleCnt++;
|
||||
}
|
||||
}
|
||||
foreach (var role in toRemove)
|
||||
|
@ -82,9 +82,9 @@ namespace NadekoBot.Modules.Games
|
||||
var prefix = NadekoBot.ModulePrefixes[typeof(Games).Name];
|
||||
var toSend = dropAmount == 1
|
||||
? GetLocalText(channel, "curgen_sn", NadekoBot.BotConfig.CurrencySign)
|
||||
+ GetLocalText(channel, "pick_sn", prefix)
|
||||
+ " " + GetLocalText(channel, "pick_sn", prefix)
|
||||
: GetLocalText(channel, "curgen_pl", dropAmount, NadekoBot.BotConfig.CurrencySign)
|
||||
+ GetLocalText(channel, "pick_pl", prefix);
|
||||
+ " " + GetLocalText(channel, "pick_pl", prefix);
|
||||
var file = GetRandomCurrencyImage();
|
||||
using (var fileStream = file.Value.ToStream())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user