TelegramBots icon indicating copy to clipboard operation
TelegramBots copied to clipboard

message.hasPhoto() never be true

Open DOGGER152 opened this issue 4 years ago • 1 comments

This method always false, when I tried to send photos. I wrote this simple code: `if (message.hasPhoto()) { messageActions.sendMsg(message,"OK"); }

if (message.getText().toLowerCase().matches("(\W*)?hi")) { messageActions.sendMsg("OK"); }` so, second condition works perfectly, but first condition never works. P.S. sorry for some troubles in my English

DOGGER152 avatar Sep 09 '21 14:09 DOGGER152

The source code for hasPhoto looks pretty clean. How are you sending photos? Keep in mind that uncompressed Pictures are not Photos but Documents.

Chase22 avatar Oct 09 '21 21:10 Chase22