Archived
1

Broadcast message to all Instinkt players

Closes #7
This commit is contained in:
2017-11-25 03:00:34 +04:00
parent b038d5b10d
commit ac0292ab6f
12 changed files with 81 additions and 50 deletions

View File

@@ -14,8 +14,7 @@ import (
func (u *Users) ProfileMessage(update *tgbotapi.Update, playerRaw *dbmapping.Player) string {
profileRaw, ok := u.GetProfile(playerRaw.ID)
if !ok {
c.Talkers.AnyMessageUnauthorized(update)
return "fail"
return c.Talkers.AnyMessageUnauthorized(update)
}
league := dbmapping.League{}
err := c.Db.Get(&league, c.Db.Rebind("SELECT * FROM leagues WHERE id=?"), playerRaw.LeagueID)
@@ -124,8 +123,7 @@ func (u *Users) UsersList(update *tgbotapi.Update) string {
}
usersArray, ok := u.getUsersWithProfiles()
if !ok {
c.Talkers.BotError(update)
return "fail"
return c.Talkers.BotError(update)
} else {
u.usersList(update, page, usersArray)
return "ok"