2017-10-04 17:56:18 +04:00
|
|
|
|
// i2_bot – Instinct PokememBro Bot
|
|
|
|
|
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
|
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
2018-05-19 12:14:25 +04:00
|
|
|
|
"github.com/fat0troll/i2_bot/lib/appcontext"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/broadcaster"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/chatter"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/datacache"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/forwarder"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/migrations"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/orders"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/pinner"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/pokedexer"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/reminder"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/router"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/sender"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/squader"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/statistics"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/talkers"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/users"
|
|
|
|
|
"github.com/fat0troll/i2_bot/lib/welcomer"
|
2017-10-04 17:56:18 +04:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
c *appcontext.Context
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
c := appcontext.New()
|
|
|
|
|
c.Init()
|
2017-11-22 16:32:10 +04:00
|
|
|
|
|
2017-10-04 17:56:18 +04:00
|
|
|
|
router.New(c)
|
2017-10-06 02:56:06 +04:00
|
|
|
|
migrations.New(c)
|
|
|
|
|
c.RunDatabaseMigrations()
|
2018-01-29 23:50:25 +04:00
|
|
|
|
datacache.New(c)
|
2018-03-31 16:45:09 +04:00
|
|
|
|
sender.New(c)
|
2017-11-14 03:44:21 +04:00
|
|
|
|
forwarder.New(c)
|
2017-11-21 06:06:32 +04:00
|
|
|
|
pokedexer.New(c)
|
2017-11-14 03:44:21 +04:00
|
|
|
|
pinner.New(c)
|
2017-10-07 02:23:25 +04:00
|
|
|
|
talkers.New(c)
|
2017-11-21 06:06:32 +04:00
|
|
|
|
broadcaster.New(c)
|
2017-11-13 22:51:50 +04:00
|
|
|
|
welcomer.New(c)
|
2017-11-19 22:16:11 +04:00
|
|
|
|
chatter.New(c)
|
|
|
|
|
squader.New(c)
|
2017-11-21 06:06:32 +04:00
|
|
|
|
users.New(c)
|
|
|
|
|
statistics.New(c)
|
2017-11-26 15:28:55 +04:00
|
|
|
|
orders.New(c)
|
2017-12-23 01:40:36 +04:00
|
|
|
|
reminder.New(c)
|
2017-10-04 17:56:18 +04:00
|
|
|
|
|
2017-11-14 03:44:21 +04:00
|
|
|
|
c.Log.Info("=======================")
|
|
|
|
|
c.Log.Info("= i2_bot initialized. =")
|
|
|
|
|
c.Log.Info("=======================")
|
|
|
|
|
|
2017-11-24 13:24:36 +04:00
|
|
|
|
c.Cron.Start()
|
|
|
|
|
c.Log.Info("> Cron started.")
|
|
|
|
|
|
2018-02-05 12:37:46 +04:00
|
|
|
|
c.StartBot()
|
2017-10-04 17:56:18 +04:00
|
|
|
|
}
|