@decorators.action(ChatAction.TYPING)
@decorators.restricted
@decorators.failwithmessage
def on_list_command(update: Update, _):
    logger.info('/list')
    with session_scope() as session:
        packs = session.query(Pack).filter_by(user_id=update.effective_user.id).order_by(Pack.title).all()
        packs = packs[:98]
        strings_list = ['<a href="{}">{}</a> ({})'.format(utils.name2link(pack.name), pack.title, ('a' if pack.is_animated else 's')) for pack in packs]
    if (not strings_list):
        update.message.reply_text(Strings.LIST_NO_PACKS)
        return
    update.message.reply_html(('• {}'.format('\n• '.join(strings_list)) + Strings.LIST_FOOTER))
    return ConversationHandler.END
@decorators.action(ChatAction.TYPING)
@decorators.restricted
@decorators.failwithmessage
def on_list_command(update: Update, _):
    logger.info('/list')
    with session_scope() as session:
        packs = session.query(Pack).filter_by(user_id=update.effective_user.id).order_by(Pack.title).all()
        packs = packs[:98]
        strings_list = ['<a href="{}">{}</a> ({})'.format(utils.name2link(pack.name), pack.title, ('a' if pack.is_animated else 's')) for pack in packs]
    if (not strings_list):
        update.message.reply_text(Strings.LIST_NO_PACKS)
        return
    update.message.reply_html(('• {}'.format('\n• '.join(strings_list)) + Strings.LIST_FOOTER))
    return ConversationHandler.END