21 lines
436 B
Go
21 lines
436 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
|
|
"git.3crabs.ru/VLADIMIR/butler/internal/modules/messenger/telegram"
|
|
"git.3crabs.ru/VLADIMIR/butler/internal/services/listener"
|
|
)
|
|
|
|
func main() {
|
|
args := os.Args[1:] // tg token
|
|
messengerTelegram, err := telegram.NewMessengerTelegram(args[0])
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
listenerService := listener.NewListener(messengerTelegram)
|
|
ctx := context.Background()
|
|
listenerService.Run(ctx)
|
|
}
|