21 lines
590 B
Go
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)
|
|
}
|