30 lines
514 B
Go
30 lines
514 B
Go
// Fantasy World Zookeeper Bot
|
|
// Copyright (c) 2018 Vladimir "fat0troll" Hodakov
|
|
|
|
package telegram
|
|
|
|
import (
|
|
"github.com/rs/zerolog"
|
|
"gitlab.com/toby3d/telegram"
|
|
"source.hodakov.me/fat0troll/fwzookeeper/context"
|
|
)
|
|
|
|
var (
|
|
c *context.Context
|
|
log zerolog.Logger
|
|
|
|
bot *telegram.Bot
|
|
)
|
|
|
|
// 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 instance")
|
|
|
|
go func() {
|
|
StartBot()
|
|
}()
|
|
}
|