requested syntax changes

This commit is contained in:
Bernhard 2019-09-17 10:51:14 +03:00 committed by GitHub
parent 727f5a7a3e
commit 837b4d2360
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,12 +27,12 @@ public enum Flag implements Predicate<Update> {
CHOSEN_INLINE_QUERY(Update::hasChosenInlineQuery), CHOSEN_INLINE_QUERY(Update::hasChosenInlineQuery),
// Message Flags // Message Flags
REPLY(upd -> upd.hasMessage() && upd.getMessage().isReply()), REPLY(upd -> MESSAGE.test(upd) && upd.getMessage().isReply()),
DOCUMENT(upd -> upd.hasMessage() && upd.getMessage().hasDocument()), DOCUMENT(upd -> MESSAGE.test(upd) && upd.getMessage().hasDocument()),
TEXT(upd -> upd.hasMessage() && upd.getMessage().hasText()), TEXT(upd -> MESSAGE.test(upd) && upd.getMessage().hasText()),
PHOTO(upd -> upd.hasMessage() && upd.getMessage().hasPhoto()), PHOTO(upd -> MESSAGE.test(upd) && upd.getMessage().hasPhoto()),
LOCATION(upd -> upd.hasMessage() && upd.getMessage().hasLocation()), LOCATION(upd -> MESSAGE.test(upd) && upd.getMessage().hasLocation()),
CAPTION(upd -> upd.hasMessage() && nonNull(upd.getMessage().getCaption())); CAPTION(upd -> MESSAGE.test(upd) && nonNull(upd.getMessage().getCaption()));
private final Predicate<Update> predicate; private final Predicate<Update> predicate;