-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
32 lines (25 loc) · 733 Bytes
/
main.go
File metadata and controls
32 lines (25 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
import (
"net/http"
"github.com/whyengineer/cryptobc_bot/bot"
)
func main() {
cbc := bot.NewBot("497425065:AAFDaMLuxdghQblsf6QG-ByH7YB4FvETlBs", nil)
//cbc.bot.Debug = true
updates := cbc.Bot.ListenForWebhook("/")
go http.ListenAndServe("127.0.0.1:5000", nil)
for update := range updates {
if update.Message == nil {
continue
}
if update.Message != nil {
cbc.Router(*update.Message)
} else if update.EditedMessage != nil {
cbc.Router(*update.EditedMessage)
}
//log.Printf("[%s] %s", update.Message.From.UserName, update.Message.Text)
//msg := tgbotapi.NewMessage(update.Message.Chat.ID, update.Message.Text)
//msg.ReplyToMessageID = update.Message.MessageID
//bot.Send(msg)
}
}