From 8f30d79c858cec6f1751fe7aea840405b11fc305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80=20=D0=A4?= =?UTF-8?q?=D0=B5=D0=B4=D0=BE=D1=80=D0=BE=D0=B2?= Date: Fri, 29 Apr 2022 21:54:15 +0700 Subject: [PATCH] fix new all command --- main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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))