Archived
1
This repository has been archived on 2022-11-04. You can view files and clone it, but cannot push or open issues or pull requests.
fwzookeeper/domains/battles/v1/forward.go
Vladimir Hodakov 0ba20b3ed5
Add battle announces to channel
Channel ID is configured in fw_zookeeper.yaml.
2018-11-29 22:15:21 +04:00

21 lines
590 B
Go

// Fantasy World Zookeeper Bot
// Copyright (c) 2018 Vladimir "fat0troll" Hodakov
package battlesv1
import (
"gitlab.com/toby3d/telegram"
itelegram "lab.wtfteam.pro/fat0troll/fw_zookeeper/internal/telegram"
"strings"
)
// ForwardCommand responds to fight request
func ForwardCommand(update *telegram.Update) {
log.Info().Msg("Battle request received!")
message := update.Message.Text
message = strings.Replace(message, " fight", " join_fight", 1)
message = strings.Replace(message, "@FWorldBot ", "", 1)
itelegram.RespondWithoutMarkdown(c.Config.Announces.ChannelID, message)
}