🔥 Removed useless files and directories
This commit is contained in:
parent
c2ea3cea36
commit
2c730eb012
|
@ -1,8 +0,0 @@
|
|||
language: go
|
||||
|
||||
go:
|
||||
- tip
|
||||
|
||||
install:
|
||||
- go get -tags=debug
|
||||
- go get -u github.com/nicksnyder/go-i18n/goi18n
|
32
init/init.go
32
init/init.go
|
@ -1,32 +0,0 @@
|
|||
package init
|
||||
|
||||
import (
|
||||
log "github.com/kirillDanshin/dlog"
|
||||
"github.com/toby3d/MyPackBot/internal/bot"
|
||||
"github.com/toby3d/MyPackBot/internal/config"
|
||||
"github.com/toby3d/MyPackBot/internal/db"
|
||||
"github.com/toby3d/MyPackBot/internal/errors"
|
||||
"github.com/toby3d/MyPackBot/internal/i18n"
|
||||
)
|
||||
|
||||
// init prepare configuration and other things for successful start
|
||||
func init() {
|
||||
log.Ln("Initializing...")
|
||||
var err error
|
||||
|
||||
// Preload configuration file
|
||||
config.Config, err = config.Open("./configs")
|
||||
errors.Check(err)
|
||||
|
||||
// Preload localization strings
|
||||
err = i18n.Open("i18n/")
|
||||
errors.Check(err)
|
||||
|
||||
// Open database or create new one
|
||||
db.DB, err = db.Open("stickers.db")
|
||||
errors.Check(err)
|
||||
|
||||
// Create bot with credentials from config
|
||||
bot.Bot, err = bot.New(config.Config.GetString("telegram.token"))
|
||||
errors.Check(err)
|
||||
}
|
Loading…
Reference in New Issue