[3.x] Change msg.html_text
behaviour
#874
Labels
3.x
Issue or PR for stable 3.x version
breaking
This breaks backwards-compatibility
enhancement
Make it better!
Description
Every time when I use
message.html_text
in my projects, I use construct like this:cause with current behavior, calling
html_text
onNone
will raise an errorTypeError: This message doesn't have any text.
With try I also should use code like this:
Describe the solution you'd like
I'd like to make it return
None
instead of raising an error.This way it will be more similar to basic
message
andcaption
params behaviour. If it's empty - returnNone
.The text was updated successfully, but these errors were encountered: