add AddChat on /start
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user