32 lines
614 B
Go
32 lines
614 B
Go
// Fantasy World Zookeeper Bot
|
|
// Copyright (c) 2018 Vladimir "fat0troll" Hodakov
|
|
|
|
package telegram
|
|
|
|
import (
|
|
"github.com/rs/zerolog"
|
|
"gitlab.com/toby3d/telegram"
|
|
"lab.wtfteam.pro/fat0troll/fw_zookeeper/context"
|
|
)
|
|
|
|
var (
|
|
c *context.Context
|
|
log zerolog.Logger
|
|
)
|
|
|
|
// Telegram is a struch which handles Telegram instance handling functions
|
|
type Telegram struct {
|
|
bot *telegram.Bot
|
|
}
|
|
|
|
// New initializes package
|
|
func New(cc *context.Context) {
|
|
c = cc
|
|
log = c.Logger.With().Str("domain", "telegram").Int("version", 1).Logger()
|
|
t := &Telegram{}
|
|
|
|
log.Info().Msg("Starting Telegram instance")
|
|
|
|
t.StartBot()
|
|
}
|