fbchat-dev/fbchat

FBchatException solution

Opened this issue · 1 comments

I use fbchat to send a message, it works fine but when it doesn't find the person we get a FBchatException. I do not know how to make it possible for him to omit such a person.

for i in range(liczba_pozycji):
    klienci = client.searchForUsers(tab_imie_naziwsko[i])
    klient = klienci[0]
    client.send(Message(text=tab_produkt[i]),   
    thread_id=format(klient.uid), thread_type=ThreadType.USER)

just use try and except