From a43b031016da9d376a9724a2d2e8ae27dd756b8c 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: Sun, 3 Apr 2022 17:35:07 +0700 Subject: [PATCH] add /start and /ping commands --- commands/command.go | 1 + main.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/commands/command.go b/commands/command.go index 05cdddb..5c22c3b 100644 --- a/commands/command.go +++ b/commands/command.go @@ -4,5 +4,6 @@ type Command string const ( Start = Command("/start") + Help = Command("/help") Ping = Command("/ping") ) diff --git a/main.go b/main.go index a1cdebc..d13cba6 100644 --- a/main.go +++ b/main.go @@ -66,6 +66,8 @@ func run() { switch command { case commands.Start: _, _ = bot.Send(tgbot.NewMessage(chatID, "Здравствуйте, я ваш дворецкий.")) + case commands.Help: + _, _ = bot.Send(tgbot.NewMessage(chatID, "Вот что я умею:\n\n1) Позвать всех")) case commands.Ping: _, _ = bot.Send(tgbot.NewMessage(chatID, "pong")) }