Esempio n. 1
0
File: sandi.py Progetto: HudaJr/TAFA
def chat_menu():
    banner()
    menu_ = list_menu["chat"]
    pilih = show_select_menu(menu_)

    if pilih == 0:
        menu()
        exit()

    banner()
    print(f"   {C}Selected:{W} {menu_[pilih - 1]}\n")

    if pilih == 1:
        func = lambda: fb.myFriend(ses)

    elif pilih == 2:
        func = lambda: fb.onlineFriend(ses)

    msg = input_("Message: ")
    limit = select(1,
                   100,
                   text="Limit: ",
                   error_msg="min: 1, max: 100",
                   que=True)
    confirm_execute()
    data = dump(func, limit, show_target=False)
    procces(lambda data: action.people.send_msg(ses, data[1], msg), data)
Esempio n. 2
0
File: sandi.py Progetto: HudaJr/TAFA
def people_menu():
    banner()
    menu_ = list_menu["people"]
    pilih = show_select_menu(menu_)

    if pilih == 0:
        menu()
        exit()

    banner()
    print(f"   {C}Selected:{W} {menu_[pilih - 1]}\n")

    if pilih == 1:
        func = lambda: fb.friend_request(ses)
        execute_func = lambda url: action.open_url(ses, url[0])

    elif pilih == 2:
        func = lambda: fb.friend_request(ses)
        execute_func = lambda url: action.open_url(ses, url[1])

    elif pilih == 3:
        func = lambda: fb.friend_requested(ses)
        execute_func = lambda url: action.open_url(ses, url)

    elif pilih == 4:
        func = lambda: fb.myFriend(ses)
        execute_func = lambda data: action.people.unfriend(ses, data[1])

    elif pilih == 5:
        func = lambda: fb.myFriend(ses)
        execute_func = lambda data: action.people.follow(ses, data[1])

    elif pilih == 6:
        func = lambda: fb.myFriend(ses)
        execute_func = lambda data: action.people.unfollow(ses, data[1])

    limit = select(1,
                   300,
                   text="Limit: ",
                   error_msg="min: 1, max: 300",
                   que=True)
    confirm_execute()
    data = dump(func, limit, show_target=False)
    procces(execute_func, data)