test paginator
This commit is contained in:
parent
6c4de0fb58
commit
42388f4b63
@ -176,7 +176,6 @@ class Paginator:
|
|||||||
|
|
||||||
bits = part.split(' ')
|
bits = part.split(' ')
|
||||||
for bit in bits:
|
for bit in bits:
|
||||||
print(bit)
|
|
||||||
next_len = length + len(bit) + 1
|
next_len = length + len(bit) + 1
|
||||||
if next_len <= self._max_line_length:
|
if next_len <= self._max_line_length:
|
||||||
out_str += bit + ' '
|
out_str += bit + ' '
|
||||||
|
|||||||
@ -71,12 +71,9 @@ class Repl:
|
|||||||
pass
|
pass
|
||||||
value = format_output(value)
|
value = format_output(value)
|
||||||
pag = Paginator()
|
pag = Paginator()
|
||||||
print(value)
|
|
||||||
pag.add(value)
|
pag.add(value)
|
||||||
print(ret)
|
|
||||||
pag.add(f'\nReturned: {ret}')
|
pag.add(f'\nReturned: {ret}')
|
||||||
for page in pag.pages():
|
for page in pag.pages():
|
||||||
print(page)
|
|
||||||
await ctx.send(page)
|
await ctx.send(page)
|
||||||
|
|
||||||
@commands.command(hidden=True)
|
@commands.command(hidden=True)
|
||||||
|
|||||||
@ -491,7 +491,7 @@ class Utils:
|
|||||||
in_time = parsed_tz.localize(in_time)
|
in_time = parsed_tz.localize(in_time)
|
||||||
else:
|
else:
|
||||||
em.set_footer(text='Time not given. Using current time.')
|
em.set_footer(text='Time not given. Using current time.')
|
||||||
in_time = parsed_tz.localize(datetime.utcnow())
|
in_time = parsed_tz.localize(datetime.utcnow()) # TODO Fix this
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise commands.CommandError(f'For some reason I can\'t parse this time string: \n'
|
raise commands.CommandError(f'For some reason I can\'t parse this time string: \n'
|
||||||
f'{orig_time} {time} {parsed_tz}\n'
|
f'{orig_time} {time} {parsed_tz}\n'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user