29 lines
541 B
Go
29 lines
541 B
Go
// Fantasy World Zookeeper Helper Bot
|
|
// Copyright (c) 2018 Vladimir "fat0troll" Hodakov
|
|
|
|
package telegram
|
|
|
|
import (
|
|
tdlib "github.com/Arman92/go-tdlib"
|
|
"github.com/rs/zerolog"
|
|
"lab.wtfteam.pro/fat0troll/fw_zookeeper_helper/context"
|
|
)
|
|
|
|
var (
|
|
c *context.Context
|
|
log zerolog.Logger
|
|
|
|
client *tdlib.Client
|
|
)
|
|
|
|
// New initializes package
|
|
func New(cc *context.Context) {
|
|
c = cc
|
|
log = c.Logger.With().Str("domain", "telegram").Int("version", 1).Logger()
|
|
|
|
log.Info().Msg("Starting Telegram MTProto instance")
|
|
|
|
Authenticate()
|
|
Connect()
|
|
}
|