From 21a308079cee8e89b2a6f80b2280fe66341e494c Mon Sep 17 00:00:00 2001 From: robatioor Date: Sat, 2 Mar 2019 16:44:12 +0330 Subject: [PATCH] add method hasAudio and method hasVoice to Message class --- .../telegram/telegrambots/meta/api/objects/Message.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Message.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Message.java index f60bbd79..d4b7b377 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Message.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Message.java @@ -381,6 +381,14 @@ public class Message implements BotApiObject { return this.video != null; } + public boolean hasAudio(){ + return this.audio != null; + } + + public boolean hasVoice(){ + return this.voice != null; + } + public boolean isReply() { return this.replyToMessage != null; }