Fixed .warnlogall, updated commandlist
This commit is contained in:
parent
27f925fa63
commit
f58e7ed7ac
@ -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) =>
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user