diff options
author | psrcek <p.srcek@gmail.com> | 2016-06-22 15:21:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-22 15:21:28 +0200 |
commit | ae44dade8005bcdcb2cb7328c70c428c2ed723f4 (patch) | |
tree | 6e4accf3209c954374b972166fb4def8192d7291 | |
parent | 5788cd0b3e2ae37340418d8e546ea245b2d78e21 (diff) |
fixed derp, should use math.ceil instead of +1
-rw-r--r-- | saylol.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,6 +1,7 @@ from time import time from helpers import * from random import randrange +import math lols = open_json_file("lol", []) timeout = 15 @@ -83,7 +84,7 @@ def on_lol_command(sender, command, label, args): if offset > len(lols): msg(sender, "&cNot a valid page (too high).") return True - msg(sender, " &9&nLol list page %s/%s" % (str(arg1 + 1), str(int(len(lols) / list_limit) + 1))) #"\t" symbol displays weirdly, hence the 4 spaces + msg(sender, " &9&nLol list page %s/%s" % (str(arg1 + 1), str(int(math.ceil(len(lols) / list_limit))))) #"\t" symbol displays weirdly, hence the 4 spaces for i in range(offset, min(offset + list_limit, len(lols))): msg(sender, "&a%s: &e%s" % (str(i).rjust(3), lols[i])) msg(sender, "") |