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