diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/api/objects/Message.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/api/objects/Message.java index 1c90f1c4..96821997 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/api/objects/Message.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/api/objects/Message.java @@ -183,7 +183,9 @@ public class Message implements BotApiObject { } public List getEntities() { - entities.forEach(x -> x.computeText(text)); + if (entities != null) { + entities.forEach(x -> x.computeText(text)); + } return entities; }