From fc0eda218fc128646da79625a97ff01d6ee31451 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: Mon, 16 May 2022 01:52:14 +0700 Subject: [PATCH] update all command --- main.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index cec3752..c180215 100644 --- a/main.go +++ b/main.go @@ -83,9 +83,17 @@ func run() { if strings.Contains(strings.ToLower(text), tag) { users, _ := db.GetUsers(chatID) - s := "@" + users[0] - for _, user := range users[1:] { - s += " @" + user + s := "" + i := 0 + for _, user := range users { + if username == user { + continue + } + if i > 0 { + s += " " + } + s += "@" + user + i++ } _, _ = bot.Send(tgbot.NewMessage(chatID, s)) }