diff options
author | Dico <Dico200@users.noreply.github.com> | 2016-06-25 08:23:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-25 08:23:34 +0200 |
commit | f6cb9ade9df43d57ec7589ddafa7cae92dfe61e0 (patch) | |
tree | 2031eec1be68ba3a0d71570a07727304138e8244 | |
parent | bfcb22f650fe432d8f9d4e72d16283eece4c2dce (diff) | |
parent | a2daa5c0b67c09470050b2a050b2cb4173a36383 (diff) |
Merge pull request #47 from psrcek/patch-2
Added max page number
-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" % str(arg1 + 1)) #"\t" symbol displays weirdly, hence the 4 spaces + msg(sender, " &9&nLol list page %s/%s" % (arg1 + 1, int(math.ceil(len(lols) / float(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, "") |