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_animationmethod, caption hadOptional[Union[str, IO]]for some reason ¯_(ツ)_/¯ - Added
explanationparameter ofsend_pollmethod to telegram-text auto-convert function, now it can takeElementliketextandcaptionin other methods,explanation_parse_modeis used instead ofparse_modein 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.Elementand it's descendants can be passed straight totextandcaptionparameters 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 toHTMLby 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_premiumfield inUserpremium_animationfield inSticker
is_videofield inStickerprotect_contentparameter to varioussend_...methods
Fixed:
- crash on mapping list of dictionaries to python objects