Closed lucasrcezimbra closed 6 years ago
Hi @Lrcezimbra, never got this error before, but it's exactly what you describe. Would be good to have a method at Message that could identify if the message was actually a notification the the bot entered in a group (we discussed some possible changes on Message here: #120).
I believe for now the message_data.get('text')
is perfect, but we'll need to figure out something more robust.
I would be glad if you open a pull request fixing this issue. Thank you very much for the contribution.
When the bot was added in a group, it receives a message like
Lucas Rangel Cezimbra invited bot
but when bottery receives this message it comes without text, so raises an exception as below.https://github.com/rougeth/bottery/blob/master/bottery/platform/telegram/engine.py#L133
Telegram documentation says that text is a optional field.
Is this a bug or am I doing something wrong?
If is a bug, how can we get around? We can use
message_data.get('text')
and set text toNone
when we do not have text? Or just returnNone
instead of a message?If it makes sense I can open a pull request.