update all command
This commit is contained in:
parent
8f30d79c85
commit
fc0eda218f
14
main.go
14
main.go
|
@ -83,9 +83,17 @@ func run() {
|
||||||
|
|
||||||
if strings.Contains(strings.ToLower(text), tag) {
|
if strings.Contains(strings.ToLower(text), tag) {
|
||||||
users, _ := db.GetUsers(chatID)
|
users, _ := db.GetUsers(chatID)
|
||||||
s := "@" + users[0]
|
s := ""
|
||||||
for _, user := range users[1:] {
|
i := 0
|
||||||
s += " @" + user
|
for _, user := range users {
|
||||||
|
if username == user {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if i > 0 {
|
||||||
|
s += " "
|
||||||
|
}
|
||||||
|
s += "@" + user
|
||||||
|
i++
|
||||||
}
|
}
|
||||||
_, _ = bot.Send(tgbot.NewMessage(chatID, s))
|
_, _ = bot.Send(tgbot.NewMessage(chatID, s))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue