diff --git a/domains/battles/v1/forward.go b/domains/battles/v1/forward.go index ab4e185..dc17088 100644 --- a/domains/battles/v1/forward.go +++ b/domains/battles/v1/forward.go @@ -12,7 +12,7 @@ import ( // ForwardCommand responds to fight request func ForwardCommand(update *telegram.Update) { message := "" - if update.Message.From.ID != 788961789 { + if update.Message.From.ID != 788961789 && !c.Config.Announces.EnableLocal { message := "*Смотритель более не принимает прямые запросы*\n" message += "Люди глупы и безрассудны. Им дали возможность позвать на помощь — но они пользуются ею, чтобы самоутвердиться. Довольно!\n" message += "Зовите на помощь @fw\\_zookeeper, как живого человека — через кнопку «Позвать на помощь» в игре.\n" diff --git a/local/config/announces.go b/local/config/announces.go index 27bc330..5bffdba 100644 --- a/local/config/announces.go +++ b/local/config/announces.go @@ -5,5 +5,6 @@ package config // Announces is a struct which handles announces configuration type Announces struct { - ChannelID int64 `yaml:"channel_id"` + ChannelID int64 `yaml:"channel_id"` + EnableLocal bool `yaml:"enable_local"` }