Fixed .warnlogall, updated commandlist

This commit is contained in:
Master Kwoth 2017-07-08 15:27:48 +02:00
parent 27f925fa63
commit f58e7ed7ac
4 changed files with 9 additions and 2 deletions

View File

@ -204,7 +204,7 @@ namespace NadekoBot.Modules.Administration
IGrouping<ulong, Warning>[] warnings;
using (var uow = _db.UnitOfWork)
{
warnings = uow.Warnings.GetAll().GroupBy(x => x.UserId).ToArray();
warnings = uow.Warnings.GetForGuild(Context.Guild.Id).GroupBy(x => x.UserId).ToArray();
}
await Context.Channel.SendPaginatedConfirmAsync((DiscordSocketClient)Context.Client, page, async (curPage) =>

View File

@ -7,5 +7,6 @@ namespace NadekoBot.Services.Database.Repositories
{
Warning[] For(ulong guildId, ulong userId);
Task ForgiveAll(ulong guildId, ulong userId, string mod);
Warning[] GetForGuild(ulong id);
}
}

View File

@ -2,6 +2,7 @@
using Microsoft.EntityFrameworkCore;
using System.Linq;
using System.Threading.Tasks;
using System;
namespace NadekoBot.Services.Database.Repositories.Impl
{
@ -32,5 +33,10 @@ namespace NadekoBot.Services.Database.Repositories.Impl
})
.ConfigureAwait(false);
}
public Warning[] GetForGuild(ulong id)
{
return _set.Where(x => x.GuildId == id).ToArray();
}
}
}

View File

@ -17,7 +17,7 @@ namespace NadekoBot.Services.Impl
private readonly IBotCredentials _creds;
private readonly DateTime _started;
public const string BotVersion = "1.54b";
public const string BotVersion = "1.55";
public string Author => "Kwoth#2560";
public string Library => "Discord.Net";