From 8bdcc96c8e08cd8ee7053813ae06f4ff4af88a83 Mon Sep 17 00:00:00 2001 From: Nitix Date: Thu, 20 Oct 2016 18:50:54 +0200 Subject: [PATCH] Chande index to correspond to the index in the complete list --- src/NadekoBot/Modules/Permissions/Permissions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Permissions/Permissions.cs b/src/NadekoBot/Modules/Permissions/Permissions.cs index 1ebb4433..e56fd060 100644 --- a/src/NadekoBot/Modules/Permissions/Permissions.cs +++ b/src/NadekoBot/Modules/Permissions/Permissions.cs @@ -110,7 +110,7 @@ namespace NadekoBot.Modules.Permissions using (var uow = DbHandler.UnitOfWork()) { var perms = uow.GuildConfigs.PermissionsFor(channel.Guild.Id).RootPermission; - var i = 1; + var i = 1 + 20 * (page - 1); toSend = Format.Code($"Permissions page {page}") + "\n\n" + String.Join("\n", perms.AsEnumerable().Skip((page - 1) * 20).Take(20).Select(p => $"`{(i++)}.` {(p.Next == null ? Format.Bold(p.GetCommand(channel.Guild) + " [uneditable]") : (p.GetCommand(channel.Guild)))}")); }