Bot welcome message fix for self-welcomes
This commit is contained in:
parent
53a99b0ff3
commit
0025493636
@ -47,12 +47,12 @@ func (w *Welcomer) PrivateWelcomeMessageSpecial(update *tgbotapi.Update, playerR
|
|||||||
func (w *Welcomer) GroupWelcomeMessage(update *tgbotapi.Update) string {
|
func (w *Welcomer) GroupWelcomeMessage(update *tgbotapi.Update) string {
|
||||||
newUsers := *update.Message.NewChatMembers
|
newUsers := *update.Message.NewChatMembers
|
||||||
for i := range newUsers {
|
for i := range newUsers {
|
||||||
if (newUsers[i].UserName == "i2_bot") || (newUsers[i].UserName == "i2_dev_bot") {
|
|
||||||
w.groupStartMessage(update)
|
|
||||||
}
|
|
||||||
|
|
||||||
newUser := newUsers[i]
|
newUser := newUsers[i]
|
||||||
w.groupWelcomeUser(update, &newUser)
|
if (newUser.UserName == "i2_bot") || (newUser.UserName == "i2_dev_bot") {
|
||||||
|
w.groupStartMessage(update)
|
||||||
|
} else {
|
||||||
|
w.groupWelcomeUser(update, &newUser)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return "ok"
|
return "ok"
|
||||||
|
@ -17,7 +17,7 @@ func (w *Welcomer) groupWelcomeUser(update *tgbotapi.Update, newUser *tgbotapi.U
|
|||||||
profileRaw, profileExist := c.Users.GetProfile(playerRaw.ID)
|
profileRaw, profileExist := c.Users.GetProfile(playerRaw.ID)
|
||||||
|
|
||||||
message := "*Бот Инстинкта приветствует тебя, *@"
|
message := "*Бот Инстинкта приветствует тебя, *@"
|
||||||
message += newUser.UserName
|
message += c.Users.FormatUsername(newUser.UserName)
|
||||||
message += "*!*\n\n"
|
message += "*!*\n\n"
|
||||||
|
|
||||||
if profileExist {
|
if profileExist {
|
||||||
|
Reference in New Issue
Block a user