fix new all command

This commit is contained in:
Владимир Фёдоров 2022-04-29 21:54:15 +07:00
parent 3f630cb775
commit 8f30d79c85
1 changed files with 4 additions and 3 deletions

View File

@ -83,10 +83,11 @@ func run() {
if strings.Contains(strings.ToLower(text), tag) { if strings.Contains(strings.ToLower(text), tag) {
users, _ := db.GetUsers(chatID) users, _ := db.GetUsers(chatID)
for _, user := range users { s := "@" + users[0]
_, _ = bot.Send(tgbot.NewMessage(chatID, "@"+user)) for _, user := range users[1:] {
s += " @" + user
} }
_, _ = bot.Send(tgbot.NewMessage(chatID, "@"+strings.Join(users, " @"))) _, _ = bot.Send(tgbot.NewMessage(chatID, s))
} }
command := commands.Command(strings.Replace(text, opts.Name, "", 1)) command := commands.Command(strings.Replace(text, opts.Name, "", 1))