From 327e095043beca754309b8822cbfff5dcb8b390f Mon Sep 17 00:00:00 2001 From: Nonoo Date: Tue, 15 Aug 2023 21:55:50 +0200 Subject: [PATCH] Add support for /start command --- main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.go b/main.go index 0ba409d..edf1734 100644 --- a/main.go +++ b/main.go @@ -90,6 +90,14 @@ func handleMsg(ctx context.Context, entities tg.Entities, u *tg.UpdateNewMessage case "/dlpcancel": handleCmdDLPCancel(ctx, entities, u, msg) return nil + case "/start": + fmt.Println(" (start cmd)") + if fromGroup == nil { + _, _ = telegramSender.Reply(entities, u).Text(ctx, "🤖 Welcome! This bot downloads videos from various "+ + "supported sources and then re-uploads them to Telegram, so they can be viewed with Telegram's built-in "+ + "video player.\n\nMore info: https://github.com/nonoo/yt-dlp-telegram-bot") + } + return nil default: fmt.Println(" (invalid cmd)") if fromGroup == nil {