diff --git a/PluralKit.Bot/Utils/ContextUtils.cs b/PluralKit.Bot/Utils/ContextUtils.cs index 9c0067e1..ab7ca402 100644 --- a/PluralKit.Bot/Utils/ContextUtils.cs +++ b/PluralKit.Bot/Utils/ContextUtils.cs @@ -102,8 +102,8 @@ namespace PluralKit.Bot { var buffer = new List(); await using var enumerator = items.GetAsyncEnumerator(); - - var pageCount = (totalCount / itemsPerPage) + 1; + + var pageCount = (int) Math.Ceiling(totalCount / (double) itemsPerPage); async Task MakeEmbedForPage(int page) { var bufferedItemsNeeded = (page + 1) * itemsPerPage;