Format imports with goimport
This commit is contained in:
@@ -4,18 +4,19 @@
|
||||
package forwarder
|
||||
|
||||
import (
|
||||
"github.com/go-telegram-bot-api/telegram-bot-api"
|
||||
"regexp"
|
||||
|
||||
"github.com/go-telegram-bot-api/telegram-bot-api"
|
||||
"source.wtfteam.pro/i2_bot/i2_bot/lib/dbmapping"
|
||||
)
|
||||
|
||||
// ProcessForward process forwards for single-user chats
|
||||
func (f *Forwarder) ProcessForward(update *tgbotapi.Update, playerRaw *dbmapping.Player) string {
|
||||
text := update.Message.Text
|
||||
|
||||
// Forwards
|
||||
var pokememeMsg = regexp.MustCompile(`Dex(.+)\nGrade(.+)\nName(.+)`)
|
||||
var profileMsg = regexp.MustCompile(`(Онлайн: )(\d+)(| Турнир: )(.+)\n(.+)\n(.+)\n(👤Уровень)(.+)\n`)
|
||||
var profileWithEffectsMsg = regexp.MustCompile(`(Онлайн: )(\d+)(| Турнир: )(.+)\n(.+)\n(.+)\n(.+)\n(👤Уровень)(.+)\n`)
|
||||
var profileMsg = regexp.MustCompile(`id(\s)(\d+)\n(Team)(\s)([А-Я]+)\nName(\s)(.*)\nLvl(\s)(\d+)`)
|
||||
|
||||
switch {
|
||||
case pokememeMsg.MatchString(text):
|
||||
@@ -28,8 +29,6 @@ func (f *Forwarder) ProcessForward(update *tgbotapi.Update, playerRaw *dbmapping
|
||||
case profileMsg.MatchString(text):
|
||||
c.Log.Debug("Profile posted!")
|
||||
return c.Users.ParseProfile(update, playerRaw)
|
||||
case profileWithEffectsMsg.MatchString(text):
|
||||
return c.Users.ProfileAddEffectsMessage(update)
|
||||
default:
|
||||
c.Log.Debug(text)
|
||||
}
|
||||
|
Reference in New Issue
Block a user