[commands] Fix Paginator still allowing lines which are too long.
This commit is contained in:
parent
adf74eef76
commit
8f0d16629f
@ -89,7 +89,7 @@ class Paginator:
|
|||||||
RuntimeError
|
RuntimeError
|
||||||
The line was too big for the current :attr:`max_size`.
|
The line was too big for the current :attr:`max_size`.
|
||||||
"""
|
"""
|
||||||
if len(line) >= self.max_size:
|
if len(line) > self.max_size - len(self.prefix) - 2:
|
||||||
raise RuntimeError('Line exceeds maximum page size %s' % (self.max_size))
|
raise RuntimeError('Line exceeds maximum page size %s' % (self.max_size))
|
||||||
|
|
||||||
if self._count + len(line) + 1 > self.max_size:
|
if self._count + len(line) + 1 > self.max_size:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user