1
This repository has been archived on 2022-11-04. You can view files and clone it, but cannot push or open issues or pull requests.
fwzookeeper_helper/internal/telegram/exported.go
2018-12-04 08:32:11 +04:00

32 lines
561 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()
go func() {
Connect()
}()
}