Archived
1

Add support for English league name in /me

This commit is contained in:
2018-05-19 13:11:56 +04:00
parent 98bf2c393b
commit 3723a1991f
7 changed files with 30 additions and 14 deletions

View File

@@ -6,8 +6,8 @@ package forwarder
import (
"regexp"
"github.com/go-telegram-bot-api/telegram-bot-api"
"github.com/fat0troll/i2_bot/lib/dbmapping"
"github.com/go-telegram-bot-api/telegram-bot-api"
)
// ProcessForward process forwards for single-user chats
@@ -16,7 +16,7 @@ func (f *Forwarder) ProcessForward(update *tgbotapi.Update, playerRaw *dbmapping
// Forwards
var pokememeMsg = regexp.MustCompile(`Dex(.+)\nGrade(.+)\nName(.+)`)
var profileMsg = regexp.MustCompile(`id(\s)(\d+)\n(Team)(\s)([А]+)\nName(\s)(.*)\nLvl(\s)(\d+)`)
var profileMsg = regexp.MustCompile(`id(\s)(\d+)\n(Team)(\s)([A-Z]+)\nName(\s)(.*)\nLvl(\s)(\d+)`)
switch {
case pokememeMsg.MatchString(text):