Archived
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/internal/telegram/exported.go

30 lines
514 B
Go
Raw Normal View History

2018-11-29 20:32:51 +04:00
// Fantasy World Zookeeper Bot
// Copyright (c) 2018 Vladimir "fat0troll" Hodakov
package telegram
import (
"github.com/rs/zerolog"
"gitlab.com/toby3d/telegram"
2019-10-08 09:13:54 +04:00
"source.hodakov.me/fat0troll/fwzookeeper/context"
2018-11-29 20:32:51 +04:00
)
var (
c *context.Context
log zerolog.Logger
bot *telegram.Bot
)
2018-11-29 20:32:51 +04:00
// 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()
}()
2018-11-29 20:32:51 +04:00
}