refactor: cleanup redundant code
This commit is contained in:
parent
9e7432a1a1
commit
89286b7e73
3 changed files with 28 additions and 71 deletions
9
bot.go
9
bot.go
|
|
@ -117,3 +117,12 @@ func stickerFromID(id string) *tele.Sticker {
|
|||
},
|
||||
}
|
||||
}
|
||||
|
||||
func setTyping(c tele.Context) chan error {
|
||||
resultCh := make(chan error, 1)
|
||||
go func() {
|
||||
defer close(resultCh)
|
||||
resultCh <- c.Bot().Notify(c.Chat(), tele.Typing)
|
||||
}()
|
||||
return resultCh
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue