27 lines
605 B
Go
27 lines
605 B
Go
// Fantasy World Zookeeper Bot
|
|
// Copyright (c) 2018 Vladimir "fat0troll" Hodakov
|
|
|
|
package commandsv1
|
|
|
|
import (
|
|
"github.com/rs/zerolog"
|
|
"source.hodakov.me/fat0troll/fwzookeeper/context"
|
|
"source.hodakov.me/fat0troll/fwzookeeper/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)
|
|
router.RegisterPrivateCommand("help", HelpCommand)
|
|
|
|
log.Info().Msg("Domain «commands» initialized")
|
|
}
|