Archived
1

Message split for found users (bypassing Telegram limitations)

This commit is contained in:
Vladimir Hodakov 2018-01-23 20:19:09 +04:00
parent 6a57d8581c
commit 7780fb4f00

View File

@ -84,6 +84,15 @@ func (u *Users) foundUsersMessage(update *tgbotapi.Update, usersArray []dbmappin
message += " /profile" + strconv.Itoa(usersArray[i].PlayerID) + "\n" message += " /profile" + strconv.Itoa(usersArray[i].PlayerID) + "\n"
message += "Telegram ID: " + strconv.Itoa(usersArray[i].TelegramID) + "\n" message += "Telegram ID: " + strconv.Itoa(usersArray[i].TelegramID) + "\n"
message += "Последнее обновление: " + usersArray[i].CreatedAt.Format("02.01.2006 15:04:05") + "\n" message += "Последнее обновление: " + usersArray[i].CreatedAt.Format("02.01.2006 15:04:05") + "\n"
if len(message) > 2000 {
msg := tgbotapi.NewMessage(update.Message.Chat.ID, message)
msg.ParseMode = "Markdown"
c.Bot.Send(msg)
message = ""
}
} }
msg := tgbotapi.NewMessage(update.Message.Chat.ID, message) msg := tgbotapi.NewMessage(update.Message.Chat.ID, message)