Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
samarets committed Aug 5, 2022
1 parent 1ba8c20 commit 2a502b1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
BOT_TOKEN=
NOTIFICATIONS_CHAT_ID=
BOT_TOKEN=
2 changes: 1 addition & 1 deletion internal/bot/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (b *bot) InitUpdates() {
if update.Message.IsCommand() {
switch update.Message.Command() {
case "start":
b.StartCommand(update.Message)
b.StartCommand(update)
case "connect":
b.ConnectCommand(update)
case "break":
Expand Down
6 changes: 3 additions & 3 deletions internal/bot/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import (
"github.com/samarets/support-bot/internal/log"
)

func (b *bot) StartCommand(message *tgbotapi.Message) {
if message == nil {
func (b *bot) StartCommand(update tgbotapi.Update) {
if update.Message == nil {
return
}

msg := tgbotapi.NewMessage(
message.Chat.ID,
update.Message.Chat.ID,
"🤖 Привіт, напиши своє питання - ми допоможемо",
)

Expand Down

0 comments on commit 2a502b1

Please sign in to comment.