- Bot API 4.9 to 5.1
- Changed versioning since this is a new library derived from an old library
- Minor bug fixes
- Bot API 3.6 to 4.9
- added utils helper functions to help with decrypting passport data.
- Await
aiohttp.ClientSession.close()
- Upgraded dependency
aiohttp>=3.0.0
- Bot API 3.6
- Added
parse_mode
to all methods and namedtuples supportingcaption
- Added
supports_streaming
andconnected_website
to relevant methods and namedtuples - Fixed downloading through proxy in
telepot.aio.api
module
- Bot API 3.5
- Added method
sendMediaGroup
and namedtupleInputMediaPhoto
andInputMediaVideo
- Added parameter
provider_data
to methodsendInvoice
- Better exception handling in
telepot.aio.api
module
- Bot API 3.4
- Live location:
- Added
live_period
to methodsendLocation
, and namedtupleInlineQueryResultLocation
andInputLocationMessageContent
- Added method
editMessageLiveLocation
andstopMessageLiveLocation
- Added
- Added method
setChatStickerSet
anddeleteChatStickerSet
- Added
sticker_set_name
andcan_set_sticker_set
to namedtupleChat
- Added
caption_entities
to namedtupleMessage
- Added method
editMessageLiveLocation
andstopMessageLiveLocation
to classEditor
- Added method
setChatStickerSet
anddeleteChatStickerSet
to classAdministrator
- Allowed supplying initial
offset
toMessageLoop
- Allowed Bot API access through proxy
- Bot API 3.3
- Added new fields to namedtuple
Chat
,Message
, andUser
- Included
aiohttp.ClientResponseError
in raisingBadHTTPResponse
- Added package
telepot.text
to help format Markdown and HTML by applying entities
- Bot API 3.2
- Added methods:
getStickerSet()
uploadStickerFile()
createNewStickerSet()
addStickerToSet()
setStickerPositionInSet()
deleteStickerFromSet()
- Added namedtuple
StickerSet
,MaskPosition
- Added new fields to
Sticker
- Added
cancel()
to asyncMessageLoop
(no change to traditional counterpart)
- Bot API 3.1
- Added methods:
restrictChatMember()
promoteChatMember()
exportChatInviteLink()
setChatPhoto()
deleteChatPhoto()
setChatTitle()
setChatDescription()
pinChatMessage()
unpinChatMessage()
- Added parameter
until_date
to methodkickChatMember()
- Added fields to namedtuple
Chat
andChatMember
- Added namedtuple
ChatPhoto
- Added exception
NotEnoughRightsError
to capture situations where the bot does not have enough rights to perform operations on channels, groups, or supergroups. - Changed some internal function names to be more descriptive, e.g.
_yell()
becomes_invoke()
,_delay_yell()
becomes_create_invoker()
. - Tested on Python 3.6.1
- Bot API 3.0
- Can receive updates containing ShippingQuery and PreCheckoutQuery
- Added flavors
shipping_option
andpre_checkout_query
- Added nametuples
Invoice
,LabeledPrice
,ShippingOption
,ShippingAddress
,OrderInfo
,ShippingQuery
,PreCheckoutQuery
,SuccessfulPayment
- Added method
sendInvoice()
,answerShippingQuery()
, andanswerPreCheckoutQuery()
- Added method
deleteMessage()
andsendVideoNote()
. Added namedtupleVideoNote
. - Added new fields to various namedtuples
- Added function
per_invoice_payload
and classInvoiceHandler
- Async version compliant with aiohttp2
- Added
telepot.loop
andtelepot.aio.loop
module. Methodmessage_loop()
deprecated. Use classMessageLoop
,OrderedWebhook
, orWebhook
instead.
- In
message_loop()
, delay longer between HTTP 502 responses - Handled empty JSON responses (async version)
- Added
quote_fields
parameter to aiohttp hack - Fixed dependency at
aiohttp==1.3
- Async Bot's scheduler method
event_at()
was modified to use unix timestamp
- Added parameter
max_connections
andallowed_updates
to methodsetWebhook()
- Added parameter
allowed_updates
to methodgetUpdates()
andmessage_loop()
- Added method
deleteWebhook()
- Recognized
channel_post
andedited_channel_post
in Update object - Removed flavor
edited_chat
. Keep 4 flavors:chat
,callback_query
,inline_query
, andchosen_inline_result
. When dealing withchat
messages, it is up to the user to differentiate between various kinds, e.g. new/edited, private/group/supergroup/channel, etc. setGameScore()
has parameterforce
anddisable_edit_message
answerCallbackQuery()
has parametercache_time
Message
namedtuple has fieldforward_from_message_id
- Renamed
ReplyKeyboardHide
toReplyKeyboardRemove
- Used the presence of
chat_instance
to recognize the flavorcallback_query
- Implemented Gaming Platform stuff
- Added game-related methods, e.g.
sendGame
,setGameScore
, etc. - Added game-related namedtuple, e.g.
InlineQueryResultGame
, etc. telepot.glance()
may return content typegame
- Added method
getWebhookInfo
- Added new parameters to some methods, e.g.
caption
forsendAudio()
, etc. - Handled
EventNotFound
inIdleEventCoordinator.refresh()
- Changed the name
pave_callback_query_origin_map()
tointercept_callback_query_origin()
- Added
include_callback_query_chat_id()
- I am finally satisfied with callback query handling. Many styles of dealing with callback query are now possible.
- Added a few
per_callback_query_*()
seeder factories - Added a few pair producers, e.g.
pave_event_space()
,pave_callback_query_origin_map()
- Added
Bot.Scheduler
to schedule internal events - Invented a standard event format for delegates to create their own events easily
- Improved Mixin framework. Added
StandardEventMixin
,IdleTerminateMixin
, andInterceptCallbackQueryMixin
. - Added
CallbackQueryOriginHandler
- Revamped
Listener
and message capture specifications - Default
retries=3
forurllib3
- Relaxed
urllib3>=1.9.1
insetup.py
- Fixed
urllib3==1.9.1
insetup.py
- Handling of callback query still unsatisfactory, a transitional release
- Changed async version to
telepot.aio
to avoid collision withasync
keyword - Added
CallbackQueryCoordinator
andCallbackQueryAble
to facilitate transparent handling ofCallbackQuery
- Added
AnswererMixin
to give anAnswerer
instance - Added
Timer
to express different timeout behaviors - Added
enable_callback_query
parameter to*Handler
constructors - Added default
on_timeout
method to@openable
decorator - Added
IdleTerminate
andAbsentCallbackQuery
as subclasses ofWaitTooLong
to distinguish between different timeout situations - Revamped
Listener
to handle different timeout requirements - Added
types
parameter toper_chat_id()
- By default,
per_from_id()
andUserHandler
reacts to non-callback_query
only - Fixed
Bot.download_file()
- Added docstrings for Sphinx generation
- Re-organized examples
- Added flavor
edited_chat
and handler functionon_edited_chat_message
- New Bot API methods:
getChat
,leaveChat
,getChatAdministrators
,getChatMember
, andgetChatMembersCount
- Added namedtuple
ChatMember
and other new fields - No longer dependent on
requests
. Useurllib3
throughout (traditional version). - Start adding docstring and using Sphinx to generate documentations.
- Added HTTP connection pooling (for both traditional and async version). Bot API requests are much speedier.
- Most requests are now done with
urllib3
, moving away fromrequests
. - Added module
telepot.routing
andtelepot.async.routing
to provide common key functions and routing tables forRouter
to use. - Removed method
set_key_function
andset_routing_table
fromRouter
. Access instance variablekey_function
androuting_table
instead. - Added function
telepot.message_identifier
to extract message identifier for editing messages. - Added helper class
Editor
to ease editing messages. ChatHandler
, by default, also capturescallback_query
from the same user.- Added
InlineUserHandler
to capture only inline-related messages. - Async version uses
async
/await
, stops supporting Python 3.4, works on Python 3.5+ from now on.
- Patched
requests
andaiohttp
to send unicode filenames
- Bot API 2.0
- Added new flavor
callback_query
- Added a bunch of namedtuples to reflect new objects in Bot API
- Added methods:
sendVenue()
,sendContact()
kickChatMember()
,unbanChatMember()
answerCallbackQuery()
editMessageText()
,editMessageCaption()
,editMessageReplyMarkup()
- To
ChatContext
, added a propertyadministrator
- Added new flavor
- Added
telepot.exception.MigratedToSupergroupChatError
- Backward-incompatible name changes
- Flavor
normal
→chat
- Method
notifyOnMessage
→message_loop
- Method
messageLoop
→message_loop
- Method
downloadFile
→download_file
- Function
telepot.namedtuple.namedtuple
was removed. Create namedtuples using their constructors directly. - Function
telepot.glance2
was removed. Usetelepot.glance
. - Chat messages' content type returned by
telepot.glance
:new_chat_participant
→new_chat_member
left_chat_participant
→left_chat_member
- Flavor
- Added underlying response object to
BadHTTPResponse
and underlying JSON object toTelegramError
- Added
TooManyRequestsError
as a subclass toTelegramError
- Added a few
TelegramError
subclasses to indicate specific errors - Override
BadHTTPResponse
's__unicode__()
and__str__()
to shorten traceback
- Changed
Answerer
interface. Compute function is now passed to methodanswer()
, not to the constructor. - Added parameter
disable_notification
to methodssendZZZ()
- Added function
telepot.delegate.per_application()
andper_message()
- Used
data
to pass POST parameters to prevent too-long query strings on URL - Async version support pushed back to Python 3.4.2
- Supports file-like object and filename when sending files
- Moved all exceptions to module
telepot.exception
- Expanded testing to Python 3.5
- Introduced automatic message routing to
Bot.handle()
andZZZHandler.on_message()
. Messages are routed to sub-handlers according to flavor, by default. - As an alternative to implementing
Bot.handle(msg)
, you may implementBot.on_chat_message(msg)
,Bot.on_inline_query(msg)
, andBot.on_chosen_inline_result(msg)
as needed. - As an alternative to implementing
ZZZHandler.on_message()
, you may implementZZZHandler.on_chat_message(msg)
,ZZZHandler.on_inline_query(msg)
, andZZZHandler.on_chosen_inline_result(msg)
as needed. notifyOnMessage()
andmessageLoop()
accept a dict as callback, routing messages according to flavor.- Added function
telepot.flavor_router()
, classestelepot.helper.Router
andtelepot.helper.DefaultRouterMixin
, and their async counterparts to facilitate message routing. - Many functions in
telepot.delegate
andtelepot.helper
now have aliases in their respective async modules, making imports more symmetric.
- Added
Answerer
class to better deal with inline queries - Made
telepot.glance()
equivalent totelepot.glance2()
. Developers are encouraged to usetelepot.glance()
from now on. - Added
telepot.flance()
, a combination oftelepot.flavor()
andtelepot.glance()
.
- Handle new field
chosen_inline_result
in Update object telepot.flavor()
returns a new flavorchosen_inline_result
- Added
telepot.namedtuple.ChosenInlineResult
class
- Changed normal message's flavor to
normal
- Moved all namedtuple-related stuff to a new module
telepot.namedtuple
. All calls to the functiontelepot.namedtuple()
should be changed totelepot.namedtuple.namedtuple()
- Added a function
telepot.flavor()
to differentiate between a normal message and an inline query - Added
flavor
parameter totelepot.glance2()
to extract info according to message flavor notifyOnMessage()
andmessageLoop()
can handle inline query as well as normal chat messages- Added a few
per_XXX_id()
functions useful for spawning delegates for inline queries - Added
UserHandler
reply_markup
parameter can accept namedtuplesReplyKeyboardMarkup
,ReplyKeyboardHide
,ForceReply
as values
- Added webhook interface
- Added
supergroup_chat_created
,migrate_to_chat_id
,migrate_from_chat_id
, andchannel_chat_created
fields to Message
- Added
openable()
class decorator - Default
on_close()
prints out exception - Async
SpeakerBot
andDelegatorBot
constructor acceptsloop
parameter
- Revamped
Listener
andChatHandler
architecture - Added
create_open()
- Conforms to latest Telegram Bot API as of October 8, 2015
- Added
Chat
class, removedGroupChat
- Added
glance2()
- Added
per_chat_id_except()
- Added lock to
Microphone
, make it thread-safe
- Added listener and delegation mechanism
- Conforms to latest Telegram Bot API as of September 18, 2015
- Added
getFile()
anddownloadFile()
method - Added
File
namedtuple - Removed
file_link
field from namedtuples
- In async
messageLoop()
, a regular handler function would be called directly, whereas a coroutine would be allocated a task, usingBaseEventLoop.create_task()
. - In
messageLoop()
andnotifyOnMessage()
, therelax
time default is now 0.1 second.
- Fixed
pip install
syntax error - Having wasted a lot of version numbers, I finally get a better hang of setup.py, pip, and PyPI.
- Conforms to latest Telegram Bot API as of September 7, 2015
- Added an async version for Python 3.4
- Added a
file_link
field to some namedtuples, in response to a not-yet-documented change in Bot API - Better exception handling on receiving invalid JSON responses
- On receiving unexpected fields,
namedtuple()
would issue a warning and would not break.
- Conforms to latest Telegram Bot API as of August 29, 2015
- Added
certificate
parameters tosetWebhook()
- Added
telepot.glance()
andtelepot.namedtuple()
- Consolidated all tests into one script
- Use MIT license
- Conforms to latest Telegram Bot API as of August 15, 2015
- Added
sendVoice()
- Added
caption
andduration
parameters tosendVideo()
- Added
performer
andtitle
parameters tosendAudio()
- Test scripts test the module more completely