Vladimir Hodakov
5820a37326
This commit may be used as template for making any new Telegram bots. Just check out it, change your variables and start developing new shiny bot! Maybe I need to create bot generator...
26 lines
551 B
Go
26 lines
551 B
Go
// Fantasy World Zookeeper Bot
|
|
// Copyright (c) 2018 Vladimir "fat0troll" Hodakov
|
|
|
|
package commandsv1
|
|
|
|
import (
|
|
"github.com/rs/zerolog"
|
|
"lab.wtfteam.pro/fat0troll/fw_zookeeper/context"
|
|
"lab.wtfteam.pro/fat0troll/fw_zookeeper/internal/router"
|
|
)
|
|
|
|
var (
|
|
c *context.Context
|
|
log zerolog.Logger
|
|
)
|
|
|
|
// New initializes package
|
|
func New(cc *context.Context) {
|
|
c = cc
|
|
log = c.Logger.With().Str("domain", "commands").Int("version", 1).Logger()
|
|
|
|
router.RegisterPrivateCommand("start", StartCommand)
|
|
|
|
log.Info().Msg("Domain «commands» initialized")
|
|
}
|