fix bug with village url
This commit is contained in:
parent
79feaeff04
commit
f6076f02d2
|
@ -32,7 +32,7 @@ type handler struct {
|
|||
api *sdk.SDK
|
||||
}
|
||||
|
||||
func AttachHandlers(c *cron.Cron, cfg Config) {
|
||||
func Attach(c *cron.Cron, cfg Config) {
|
||||
h := &handler{
|
||||
since: time.Now(),
|
||||
serverRepo: cfg.ServerRepo,
|
||||
|
|
|
@ -50,7 +50,7 @@ func newMessageData(cfg newMessageDataConfig) messageData {
|
|||
cfg.ennoblement.Village.Name,
|
||||
cfg.ennoblement.Village.X,
|
||||
cfg.ennoblement.Village.Y)
|
||||
data.villageURL = utils.FormatVillageURL(cfg.world, cfg.host, cfg.ennoblement.VillageID)
|
||||
data.villageURL = utils.FormatVillageURL(cfg.world, cfg.host, cfg.ennoblement.Village.ID)
|
||||
}
|
||||
if !isPlayerNil(cfg.ennoblement.OldOwner) {
|
||||
data.oldOwnerName = cfg.ennoblement.OldOwner.Name
|
||||
|
|
2
main.go
2
main.go
|
@ -66,7 +66,7 @@ func main() {
|
|||
c := cron.New(cron.WithChain(
|
||||
cron.SkipIfStillRunning(cron.VerbosePrintfLogger(log.New(os.Stdout, "cron: ", log.LstdFlags))),
|
||||
))
|
||||
_cron.AttachHandlers(c, _cron.Config{
|
||||
_cron.Attach(c, _cron.Config{
|
||||
ServerRepo: serverRepo,
|
||||
TribeRepo: tribeRepo,
|
||||
Discord: sess,
|
||||
|
|
Reference in New Issue