Update auth.go

refine message
This commit is contained in:
TonyQ Wang 2022-04-16 21:25:46 +08:00 committed by GitHub
parent cb4500618e
commit 38dfa32bfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,13 @@ func (it *AuthInteract) Commands(interact *Interact) {
})
} else {
interact.Command("/auth", "authorize", func(reply Reply) error {
reply.Message("Enter your authentication code")
switch it.Mode {
case AuthModeToken:
reply.Message("Enter your authentication token")
case AuthModeOTP:
reply.Message("Enter your one-time password")
}
return nil
}).NamedNext(StateAuthenticated, func(code string, reply Reply, session Session) error {
switch it.Mode {