diff --git a/main.go b/main.go index 04eddb3..cec3752 100644 --- a/main.go +++ b/main.go @@ -83,10 +83,11 @@ func run() { if strings.Contains(strings.ToLower(text), tag) { users, _ := db.GetUsers(chatID) - for _, user := range users { - _, _ = bot.Send(tgbot.NewMessage(chatID, "@"+user)) + s := "@" + users[0] + 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))