From c4a39056d84a3e9808a0659d9fa57171cd6b515e 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, 25 Apr 2022 02:55:31 +0700 Subject: [PATCH] add AddUserInChat --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 5e1bbc8..1004cc2 100644 --- a/main.go +++ b/main.go @@ -82,8 +82,6 @@ func run() { chatID := update.Message.Chat.ID username := update.Message.From.UserName - _ = db.AddUserInChat(chatID, username) - if strings.Contains(strings.ToLower(text), tag) { _, _ = bot.Send(tgbot.NewMessage(chatID, allUsers)) } @@ -98,5 +96,7 @@ func run() { case commands.Ping: _, _ = bot.Send(tgbot.NewMessage(chatID, "pong")) } + + _ = db.AddUserInChat(chatID, username) } }