Archived
1

Wiper for Bastion

This commit is contained in:
2017-11-29 19:11:52 +04:00
parent 0aa26c1cfa
commit c65dad7727
3 changed files with 33 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ import (
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
"math/rand"
"regexp"
"strconv"
)
func (r *Router) routeGroupRequest(update *tgbotapi.Update, playerRaw *dbmapping.Player, chatRaw *dbmapping.Chat) string {
@@ -24,6 +25,11 @@ func (r *Router) routeGroupRequest(update *tgbotapi.Update, playerRaw *dbmapping
return squadHandled
}
bastionChatID, _ := strconv.ParseInt(c.Cfg.SpecialChats.BastionID, 10, 64)
if update.Message.Chat.ID == bastionChatID {
c.Squader.FilterBastion(update)
}
// Welcomes
if update.Message.NewChatMembers != nil {
newUsers := *update.Message.NewChatMembers