mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
Merge pull request #533 from c9s/telegram-auth-message
refine auth message
This commit is contained in:
commit
8ba0b8c81d
|
@ -84,7 +84,13 @@ func (it *AuthInteract) Commands(interact *Interact) {
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
interact.Command("/auth", "authorize", func(reply Reply) error {
|
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
|
return nil
|
||||||
}).NamedNext(StateAuthenticated, func(code string, reply Reply, session Session) error {
|
}).NamedNext(StateAuthenticated, func(code string, reply Reply, session Session) error {
|
||||||
switch it.Mode {
|
switch it.Mode {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user