Releases: cmd410/OrigamiBot
Releases · cmd410/OrigamiBot
Timeouts fixes
Hotfix
Poetry update
Merge pull request #33 from cmd410/fix-tg-rate-limit-updates-crash Poetry update
Bug fix
Bug fix
Minor fixes
- Fixed typing in
send_animation
method, caption hadOptional[Union[str, IO]]
for some reason ¯_(ツ)_/¯ - Added
explanation
parameter ofsend_poll
method to telegram-text auto-convert function, now it can takeElement
liketext
andcaption
in other methods,explanation_parse_mode
is used instead ofparse_mode
in this case
telegram-text integration
This release implements a simple telegram-text integration.
How it works
- telegram-text is now an optional dependency, installation can be done with
pip install origamibot[telegram-text]
for example, or as a separate module of course. - instances of
telegram_text.base.Element
and it's descendants can be passed straight totext
andcaption
parameters of API calls. - Appropriate type hints are in place
- when converting to markup string, takes into account passed
parse_mode
, if not present sets it toHTML
by default. - old-style text messages are unaffected
- if telegram-text is not installed converting function is no-op
Example usage
from origamibot import OrigamiBot
from telegram_text import Bold
token: str = "blahblah"
my_cid: int = 12516745
bot = OrigamiBot(token)
bot.send_message(my_cid, Bold("Bold text message"))
Yet another hotfix
v2.2.2 bump version
Hotfix for python < 3.8 typing
v2.2.1 Typing hotfix for py < 3.8
Some API updates and fixes
Added:
- Support for telegram premium
is_premium
field inUser
premium_animation
field inSticker
is_video
field inSticker
protect_content
parameter to varioussend_...
methods
Fixed:
- crash on mapping list of dictionaries to python objects