fix(moderation): use ceil instead of round for moderation pagesize
All checks were successful
Pylint / Pylint (3.11) (push) Successful in 46s
All checks were successful
Pylint / Pylint (3.11) (push) Successful in 46s
This commit is contained in:
parent
1b096f9023
commit
4e40bb6a32
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ import json
|
|||
import os
|
||||
import time
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from math import ceil
|
||||
|
||||
import discord
|
||||
import humanize
|
||||
|
@ -648,7 +649,7 @@ class Moderation(commands.Cog):
|
|||
result_dict_list.append(case_dict)
|
||||
|
||||
case_quantity = len(result_dict_list)
|
||||
page_quantity = round(case_quantity / pagesize)
|
||||
page_quantity = ceil(case_quantity / pagesize)
|
||||
start_index = (page - 1) * pagesize
|
||||
end_index = page * pagesize
|
||||
|
||||
|
|
Loading…
Reference in a new issue