add AddChat on /start

This commit is contained in:
2022-04-25 02:35:18 +07:00
parent 5d9a6825fe
commit 65e5144ad1
5 changed files with 130 additions and 1 deletions
+2
View File
@@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"git.user-penguin.space/vladimir/all-tg-bot/commands"
"git.user-penguin.space/vladimir/all-tg-bot/db"
tgbot "github.com/go-telegram-bot-api/telegram-bot-api"
"github.com/umputun/go-flags"
"io/ioutil"
@@ -88,6 +89,7 @@ func run() {
switch command {
case commands.Start:
_, _ = bot.Send(tgbot.NewMessage(chatID, "Здравствуйте, я Волтер (v1.0.1), ваш дворецкий."))
_ = db.AddChat(chatID)
case commands.Help:
_, _ = bot.Send(tgbot.NewMessage(chatID, "Вот что я умею:\n\n1) Позвать всех"))
case commands.Ping: