mirror of https://github.com/tucnak/telebot
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
272 B
Go
19 lines
272 B
Go
4 years ago
|
package telebot
|
||
|
|
||
|
type testPoller struct {
|
||
|
Message string
|
||
|
}
|
||
|
|
||
|
func (p *testPoller) Poll(b *Bot, updates chan Update, stop chan struct{}) {
|
||
|
updates <- Update{Message: &Message{Text: p.Message}}
|
||
|
|
||
|
for {
|
||
|
select {
|
||
|
case <-stop:
|
||
|
close(stop)
|
||
|
return
|
||
|
default:
|
||
|
}
|
||
|
}
|
||
|
}
|