Load i18n messages

This commit is contained in:
rxdn 2020-12-25 12:37:06 +00:00
parent 76a0b421f9
commit 52bd71eab4

View File

@ -14,6 +14,7 @@ import (
"github.com/TicketsBot/GoPanel/utils" "github.com/TicketsBot/GoPanel/utils"
"github.com/TicketsBot/archiverclient" "github.com/TicketsBot/archiverclient"
"github.com/TicketsBot/common/premium" "github.com/TicketsBot/common/premium"
"github.com/TicketsBot/worker/bot/i18n"
"github.com/apex/log" "github.com/apex/log"
"github.com/rxdn/gdl/rest/request" "github.com/rxdn/gdl/rest/request"
"math/rand" "math/rand"
@ -38,6 +39,9 @@ func main() {
manage.Archiver = archiverclient.NewArchiverClientWithTimeout(config.Conf.Bot.ObjectStore, time.Second*15, []byte(config.Conf.Bot.AesKey)) manage.Archiver = archiverclient.NewArchiverClientWithTimeout(config.Conf.Bot.ObjectStore, time.Second*15, []byte(config.Conf.Bot.AesKey))
utils.LoadEmoji() utils.LoadEmoji()
if err := i18n.LoadMessages(database.Client); err != nil {
panic(err)
}
if config.Conf.Bot.ProxyUrl != "" { if config.Conf.Bot.ProxyUrl != "" {
request.RegisterHook(utils.ProxyHook) request.RegisterHook(utils.ProxyHook)