sort tags in list
This commit is contained in:
parent
4895a60848
commit
186030c70a
1
main.py
1
main.py
@ -120,6 +120,7 @@ async def del_tag(msg: Message):
|
|||||||
@dp.message_handler(commands=['list'])
|
@dp.message_handler(commands=['list'])
|
||||||
async def list_tags(msg: Message):
|
async def list_tags(msg: Message):
|
||||||
tags = [t.decode() for t in await redis.smembers('e621:subs')]
|
tags = [t.decode() for t in await redis.smembers('e621:subs')]
|
||||||
|
tags.sort()
|
||||||
lines = []
|
lines = []
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
lines.append(f'- {tag} [/del_{tag}]')
|
lines.append(f'- {tag} [/del_{tag}]')
|
||||||
|
Loading…
Reference in New Issue
Block a user