|
|
@ -38,14 +38,12 @@ func (b *Bot) Listen(subscription chan<- Message, interval time.Duration) {
|
|
|
|
}()
|
|
|
|
}()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// SendMessage sends a text message to recipient in a
|
|
|
|
// SendMessage sends a text message to recipient.
|
|
|
|
// detached goroutine.
|
|
|
|
func (b *Bot) SendMessage(recipient User, message string) error {
|
|
|
|
func (b *Bot) SendMessage(recipient User, message string) {
|
|
|
|
return api_sendMessage(b.Token, recipient, message)
|
|
|
|
go api_sendMessage(b.Token, recipient, message)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ForwardMessage forwards a message to recipient in a
|
|
|
|
// ForwardMessage forwards a message to recipient.
|
|
|
|
// detached goroutine.
|
|
|
|
func (b *Bot) ForwardMessage(recipient User, message Message) error {
|
|
|
|
func (b *Bot) ForwardMessage(recipient User, message Message) {
|
|
|
|
return api_forwardMessage(b.Token, recipient, message)
|
|
|
|
go api_forwardMessage(b.Token, recipient, message)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|