sort tags in list

This commit is contained in:
bakatrouble 2023-03-30 23:12:00 +03:00
parent 4895a60848
commit 186030c70a

View File

@ -120,6 +120,7 @@ async def del_tag(msg: Message):
@dp.message_handler(commands=['list'])
async def list_tags(msg: Message):
tags = [t.decode() for t in await redis.smembers('e621:subs')]
tags.sort()
lines = []
for tag in tags:
lines.append(f'- {tag} [/del_{tag}]')