import discord
from bot import ApprovalView
from models import ApprovalRequest

request = ApprovalRequest("id", "convo", "cmd", "desc", 0.0)
view = ApprovalView(request, buttons=[{"text":"Proceed","index":0}], hub=None)
print("View items:", view.children)
try:
    print(view.to_components())
    print("SUCCESS")
except Exception as e:
    print("CRASH:", e)
