error log
This commit is contained in:
parent
a6ab4379b2
commit
3177092fc1
12
main.go
12
main.go
@ -90,25 +90,19 @@ func main() {
|
||||
var number string
|
||||
fmt.Scanln(&number)
|
||||
_, err := client.SendPhoneNumber(number)
|
||||
if err != nil {
|
||||
fmt.Printf("Error sending phone number: %v", err)
|
||||
}
|
||||
logOnError(err, "Error sending phone number.")
|
||||
} else if currentState.GetAuthorizationStateEnum() == tdlib.AuthorizationStateWaitCodeType {
|
||||
fmt.Print("Enter code: ")
|
||||
var code string
|
||||
fmt.Scanln(&code)
|
||||
_, err := client.SendAuthCode(code)
|
||||
if err != nil {
|
||||
fmt.Printf("Error sending auth code : %v", err)
|
||||
}
|
||||
logOnError(err, "Error sending auth code.")
|
||||
} else if currentState.GetAuthorizationStateEnum() == tdlib.AuthorizationStateWaitPasswordType {
|
||||
fmt.Print("Enter Password: ")
|
||||
var password string
|
||||
fmt.Scanln(&password)
|
||||
_, err := client.SendAuthPassword(password)
|
||||
if err != nil {
|
||||
fmt.Printf("Error sending auth password: %v", err)
|
||||
}
|
||||
logOnError(err, "Error sending auth password.")
|
||||
} else if currentState.GetAuthorizationStateEnum() == tdlib.AuthorizationStateReadyType {
|
||||
fmt.Println("Authorization Ready! Let's rock")
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user