mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-08 03:22:06 +01:00
9d887e51bb
- Rename `StickerType` => `InputSticker` - Rename `{CreateNewStickerSet,AddStickerToSet}::sticker_type}` => `sticker` This just makes more sense.
3.6 KiB
3.6 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[unreleased]
Added
throttle
,cache_me
,auto_send
andfull
crate featurespayloads
moduleRequesterExt
trait which is implemented for allRequester
s and allows easily wrapping them in adaptorsadaptors
module- Request throttling - opt-in feature represented by
Throttle
bot adapter which allows automatically checking telegram limits (#10) - Request auto sending - ability to
.await
requests without need to call.send()
(opt-in feature represented byAutoSend
bot adapter, #8) get_me
caching (opt-in feature represented byCacheMe
bot adapter)
- Request throttling - opt-in feature represented by
Requester
trait which represents bot-clients (#7){Json,Multipart}Request
theBot
requests types (#6)Output<T>
alias to<<T as HasPayload>::Payload as Payload>::Output
Payload
,HasPayload
andRequest
traits which represent different parts of the request (#5)GetUpdatesNonStrict
- fail proof version ofGetUpdates
- Move core code here from the
teloxide
main repo, for older changes see it'sCHANGELOG.md
.- Following modules were moved:
bot
requests
[exceptrequests::respond
function]types
errors
net
[private]
client_from_env
was moved fromteloxide::utils
to crate root ofteloxide-core
- To simplify
GetUpdates
request it was changed to simply returnVec<Update>
(instead ofVec<Result<Update, (Value, serde_json::Error)>>
)
- Following modules were moved:
GetUpdatesNonStrict
'telegram' method, that behaves just likeGetUpdates
but doesn't fail if one of updates fails to be deserialized
Changed
- Rename
StickerType
=>InputSticker
,{CreateNewStickerSet,AddStickerToSet}::sticker_type}
=>sticker
(#23) - Use
_: IntoIterator<Item = T>
bound instead of_: Into<Vec<T>>
in telegram methods which accept collections (#21) - Make
MessageDice::dice
pub (#20) - Merge
ApiErrorKind
andKnownApiErrorKind
intoApiError
(#13) - Refactor ChatMember (#9)
- Replace a bunch of
Option<_>
fields withChatMemberKind
- Remove setters (users are not expected to create this struct)
- Add getters
- Replace a bunch of
- Changed internal mechanism of sending multipart requests
- Added
RequestError::Io(io::Error)
to wrap I/O error those can happen while sending files to telegram - Change
StickerType
: instead of newtypes (Png(InputFile)
) use structs (Png { png_sticker: InputFile }
), addStickerType::{png,tgs}
constructors - Make all fields of all methods
pub
Removed
unstable-stream
feature (nowBot::download_file_stream
is accesable by default)- old
Request
trait RequestWithFile
, now multipart requests useRequest
- Remove all
#[non_exhaustive]
annotations