mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 22:27:28 +00:00
Merge branch 'dev'
This commit is contained in:
commit
b86cafa680
2 changed files with 4 additions and 5 deletions
|
@ -36,7 +36,7 @@ class MsG:
|
||||||
time = (dt.utcnow() - td(days=29)).strftime('%d/%m/%Y/%H:%M:%S')
|
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', 7)
|
||||||
# self.suggested = u.setdefault('cogs/suggested.pkl', {'last_update': 'test', 'tags': {}, 'total': 1})
|
# 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.favorites = u.setdefault('cogs/favorites.pkl', {})
|
||||||
self.blacklists = u.setdefault('cogs/blacklists.pkl', {'global': {}, 'channel': {}, 'user': {}})
|
self.blacklists = u.setdefault('cogs/blacklists.pkl', {'global': {}, 'channel': {}, 'user': {}})
|
||||||
|
|
||||||
|
|
|
@ -39,16 +39,15 @@ async def paginate(
|
||||||
end=''):
|
end=''):
|
||||||
paginator = Paginator(prefix=prefix, suffix=suffix)
|
paginator = Paginator(prefix=prefix, suffix=suffix)
|
||||||
messages = []
|
messages = []
|
||||||
i = sorted(copy.deepcopy(i))
|
i = copy.deepcopy(i)
|
||||||
|
|
||||||
if start:
|
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 type(i) in (tuple, list, set):
|
||||||
if not i:
|
if not i:
|
||||||
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:
|
elif type(i) is dict:
|
||||||
if not i:
|
if not i:
|
||||||
i = {' ': ' '}
|
i = {' ': ' '}
|
||||||
|
|
Loading…
Reference in a new issue