1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-11-01 13:02:38 +00:00

Merge branch 'dev'

This commit is contained in:
Myned 2019-01-18 11:35:44 -05:00
commit b86cafa680
2 changed files with 4 additions and 5 deletions

View file

@ -36,7 +36,7 @@ class MsG:
time = (dt.utcnow() - td(days=29)).strftime('%d/%m/%Y/%H:%M:%S')
self.suggested = u.setdefault('cogs/suggested.pkl', 7)
# self.suggested = u.setdefault('cogs/suggested.pkl', {'last_update': 'test', 'tags': {}, 'total': 1})
print(self.suggested)
# print(self.suggested)
self.favorites = u.setdefault('cogs/favorites.pkl', {})
self.blacklists = u.setdefault('cogs/blacklists.pkl', {'global': {}, 'channel': {}, 'user': {}})

View file

@ -39,16 +39,15 @@ async def paginate(
end=''):
paginator = Paginator(prefix=prefix, suffix=suffix)
messages = []
i = sorted(copy.deepcopy(i))
i = copy.deepcopy(i)
if start:
paginator.add_line(start)
paginator.add_line(start + ('' if type(i) is not dict else '\n'))
if type(i) in (tuple, list, set):
if not i:
i = (' ')
paginator.add_line(eprefix + f'{ejoin}'.join(i) + esuffix)
paginator.add_line(eprefix + f'{ejoin}'.join(sorted(i)) + esuffix)
elif type(i) is dict:
if not i:
i = {' ': ' '}