Only reply to an invalid command if it came from a private chat
This commit is contained in:
parent
103079a2fb
commit
bfcdeb4634
4
main.go
4
main.go
@ -92,7 +92,9 @@ func handleMsg(ctx context.Context, entities tg.Entities, u *tg.UpdateNewMessage
|
||||
return nil
|
||||
default:
|
||||
fmt.Println(" (invalid cmd)")
|
||||
_, _ = telegramSender.Reply(entities, u).Text(ctx, errorStr+": invalid command")
|
||||
if fromGroup != nil {
|
||||
_, _ = telegramSender.Reply(entities, u).Text(ctx, errorStr+": invalid command")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user