Latest bugfixes and updates
This commit is contained in:
parent
4f4ff8ae7b
commit
0aa26c1cfa
@ -15,7 +15,7 @@ func (r *Router) routeGroupRequest(update *tgbotapi.Update, playerRaw *dbmapping
|
||||
// Regular expressions
|
||||
var durakMsg = regexp.MustCompile("(Д|д)(У|у)(Р|р)(А|а|Е|е|О|о)")
|
||||
var huMsg = regexp.MustCompile("(Х|х)(У|у)(Й|й|Я|я|Ю|ю|Е|е)")
|
||||
var blMsg = regexp.MustCompile("(\\s|^)(Б|б)(Л|л)((Я|я)(Т|т|Д|д)|)")
|
||||
var blMsg = regexp.MustCompile("(\\s|^)(Б|б)(Л|л)((Я|я)(Т|т|Д|д))")
|
||||
var ebMsg = regexp.MustCompile("(\\s|^|ЗА|За|зА|за)(Е|е|Ё|ё)(Б|б)(\\s|Л|л|А|а|Т|т|У|у|Е|е|Ё|ё|И|и)")
|
||||
var piMsg = regexp.MustCompile("(П|п)(И|и)(З|з)(Д|д)")
|
||||
|
||||
|
@ -15,7 +15,7 @@ func (r *Router) routePrivateRequest(update *tgbotapi.Update, playerRaw *dbmappi
|
||||
// Commands with regexps
|
||||
var pokedexMsg = regexp.MustCompile("/pokede(x|ks)\\d?\\z")
|
||||
var pokememeInfoMsg = regexp.MustCompile("/pk(\\d+)")
|
||||
var usersMsg = regexp.MustCompile("/users\\d?\\z")
|
||||
var usersMsg = regexp.MustCompile("/users(\\d+|)\\z")
|
||||
var squadInfoMsg = regexp.MustCompile("/show_squad(\\d+)\\z")
|
||||
var orderSendMsg = regexp.MustCompile("/send_order(\\d+)\\z")
|
||||
|
||||
|
@ -16,8 +16,18 @@ func (w *Welcomer) groupWelcomeUser(update *tgbotapi.Update, newUser *tgbotapi.U
|
||||
|
||||
_, profileExist := c.Users.GetProfile(playerRaw.ID)
|
||||
|
||||
userName := ""
|
||||
if newUser.UserName != "" {
|
||||
userName += "@" + newUser.UserName
|
||||
} else {
|
||||
userName += newUser.FirstName
|
||||
if newUser.LastName != "" {
|
||||
userName += " " + newUser.LastName
|
||||
}
|
||||
}
|
||||
|
||||
message := "*Бот Инстинкта приветствует тебя, *@"
|
||||
message += c.Users.FormatUsername(newUser.UserName)
|
||||
message += c.Users.FormatUsername(userName)
|
||||
message += "*!*\n\n"
|
||||
|
||||
if profileExist {
|
||||
|
Reference in New Issue
Block a user