-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.go
38 lines (30 loc) · 774 Bytes
/
main.go
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
33
34
35
36
37
38
package main
import (
"fmt"
"log"
"strings"
)
func main() {
// draw banner
banner()
// load configuration from file.env
config, err := LoadConfig(".")
if err != nil {
log.Fatal("cannot load config:", err)
}
// setup telegram bot
setupTelegramBot(config.TokenBot, config.ChatID)
fmt.Println("[*] TelegramBot successfully configured")
// setup client for request
setupHttpClient(config.SessionID, config.AppID, config.UserAgent)
fmt.Println("[*] HttpClient successfully configured")
// list of users to be monitored
usernames := strings.Split(config.WatchList, ";")
watchlist := make(map[string]string)
for _, username := range usernames {
watchlist[username] = ""
}
fmt.Println("[*] WatchList ->", usernames)
// run bot
runBot(watchlist)
}