Add support for /start command

This commit is contained in:
Nonoo 2023-08-15 21:55:50 +02:00
parent 025bd853d0
commit 327e095043

View File

@ -90,6 +90,14 @@ func handleMsg(ctx context.Context, entities tg.Entities, u *tg.UpdateNewMessage
case "/dlpcancel": case "/dlpcancel":
handleCmdDLPCancel(ctx, entities, u, msg) handleCmdDLPCancel(ctx, entities, u, msg)
return nil 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: default:
fmt.Println(" (invalid cmd)") fmt.Println(" (invalid cmd)")
if fromGroup == nil { if fromGroup == nil {