Archived
1

Squads and chats in DataCache, squads rework

Work in progress, bugs may vary
This commit is contained in:
2018-02-17 07:03:58 +04:00
parent 7af54a1b02
commit fef521e35b
25 changed files with 645 additions and 710 deletions

View File

@@ -4,8 +4,8 @@
package broadcaster
import (
"source.wtfteam.pro/i2_bot/i2_bot/lib/dbmapping"
"github.com/go-telegram-bot-api/telegram-bot-api"
"source.wtfteam.pro/i2_bot/i2_bot/lib/dbmapping"
"strconv"
)
@@ -37,15 +37,9 @@ func (b *Broadcaster) AdminBroadcastMessageSend(update *tgbotapi.Update, playerR
privateChats := []dbmapping.Chat{}
switch messageRaw.BroadcastType {
case "all":
privateChats, ok = c.Chatter.GetAllPrivateChats()
if !ok {
return "fail"
}
privateChats = c.DataCache.GetAllPrivateChats()
case "league":
privateChats, ok = c.Chatter.GetLeaguePrivateChats()
if !ok {
return "fail"
}
privateChats = c.DataCache.GetLeaguePrivateChats()
}
for i := range privateChats {