Commit graph

66 commits

Author SHA1 Message Date
Waffle
5349c85404 Fix compilation with nigthly feature
The `min_type_alias_impl_trait` feature was removed in faviour of `type_alias_impl_trait`.
2021-08-03 02:29:26 +03:00
Waffle
1d379a3452 Dump version: 0.3.1 => 0.3.2 2021-07-27 12:58:11 +03:00
Waffle
1fe4518ee9 Add tools for Bot/Request type erasure 2021-07-12 16:58:51 +03:00
Waffle
9e8819d726 Add Trace bot adaptor 2021-07-10 17:41:20 +03:00
Waffle
5aa622b361 impl HasPayload, Request and Requester for either::Either
This allows to use different adaptors depending on runtime context.
2021-07-08 13:04:40 +03:00
Waffle
b2152db747 Prepare 0.3.1 release 2021-07-07 20:14:27 +03:00
Waffle
23c125775c Remove Self: 'static buound on RequesterExt::throttle 2021-07-07 20:14:27 +03:00
Waffle
e7b44e6bbe Use cfg(dep_docsrs) to allow building docs properly as a dependency 2021-07-07 20:14:25 +03:00
Waffle Lapkin
2871623aa4
Fill in v0.3.0 release date 2021-07-05 19:53:42 +03:00
Waffle
df69d07f2b Bump version (0.2.2 => 0.3.0) 2021-07-04 17:36:07 +03:00
Waffle
5ac43d4ac0 Fix type of PhotoSize::{width,height} fields: i32 => u32 2021-07-04 17:36:07 +03:00
Waffle
e6b66a7383 TBA 5.3: update changelog and supported version 2021-07-04 16:06:06 +03:00
Hirrolot
52313b740c
Merge pull request #96 from teloxide/throttle_settings
Make `Throttle` settings more extendable
2021-07-04 07:59:56 +06:00
Waffle
421cf42835 Use url::Url for urls, use chrono::DateTime<Utc> for dates 2021-07-03 23:35:13 +03:00
Waffle
4377abd149 Make Throttle settings more extendable
Add a `#[non_exhaustive]` `Settings` builder struct.
Replace `with_queue_full_fn` and `spawn_with_queue_full_fn` with
`with_settings` and `spawn_with_settings`.

This allows to add more settings in the future without breaking changes.
2021-07-03 22:34:31 +03:00
Waffle
b0d2e35e5b Update changelog 2021-06-30 20:30:26 +03:00
Waffle
34e73748c3 Add a way to get info from/into Thrrotle
This patch adds `Thrrotle::{limits,set_limits,queue_status}` functions and
`QueueStatus` struct allowing to get current status of worker & change
limits of the fly.
2021-06-29 21:22:40 +03:00
Waffle
0dc565211f Add DefaultParseMode::parse_mode 2021-06-29 21:21:47 +03:00
Waffle Lapkin
e64c22753c Correct pr link in the changelog 2021-06-19 14:15:39 +03:00
liushuyu
73c34f852a
CHANGELOG: add changeset information for #94 2021-06-19 03:21:50 -06:00
Waffle
ecaa5d5bec Add net::default_reqwest_settings function
This function can help when users want to set up their own client setting for
one reason or another, since settings set by the function, are required for
stable work.

This function was previously private and named `sound_bot`. The old name was
confusing since safety and soundness are used in the Rust context almost
entirely for `unsafe` code, UB & co. So I've changed the name to a more
descriptive one.
2021-05-12 11:51:03 +03:00
Hirrolot
a068166e8d
Merge branch 'master' into api-5.2 2021-05-04 10:41:29 -07:00
Waffle Lapkin
ce1a9ece16
Merge branch 'master' into private_url 2021-05-04 18:31:18 +03:00
Waffle
b0f54533b0 Update changelog and readme 2021-05-04 16:56:27 +03:00
handlerug
37b8256cd5
Update changelog with new API errors info 2021-04-28 15:24:21 +07:00
Waffle
a7d07a770c Update CHANGELOG and remove unused imports 2021-04-27 12:17:14 +03:00
Waffle
cd170951ae Update CHANGELOG 2021-04-27 12:03:43 +03:00
Waffle
5d0713e742 Fix return types of methods
Fix return types of LeaveChat, PinChatMessage, SetChatDescription, SetChatPhoto,
SetChatTitle, UnpinAllChatMessages and UnpinChatMessage: String => True
2021-04-22 17:34:47 +03:00
Waffle Lapkin
ccdcda68d4
Merge branch 'master' into chat_member_methods 2021-03-30 16:26:46 +03:00
Hirrolot
2ab7d30ad2
Merge pull request #76 from teloxide/derive_clone
`impl Clone` for {`CacheMe<_>`, `DefaultParseMode<_>`, `Throttle<_>`}
2021-03-30 04:41:13 -07:00
Waffle Lapkin
9946a2ff20
Update CHANGELOG.md 2021-03-30 14:35:43 +03:00
Waffle
44a044af02 impl Clone for {CacheMe<_>, DefaultParseMode<_>, Throttle<_>} 2021-03-30 12:17:49 +03:00
Waffle
528187d7e6 Fix SendChatAction return type 2021-03-29 13:49:52 +03:00
Waffle
23cf363271 Prevent year 2038 problem in ChatMember
This patch changes the Type of `{Restricted,Kicked}::until_date` fields:
`i32` => `i64`.

This is done to fix so called "year 2038 problem"
(See <https://en.wikipedia.org/wiki/Year_2038_problem>).
2021-03-29 10:20:03 +03:00
Waffle
06fa3f42e8 Update changelog 2021-03-29 00:44:42 +03:00
Waffle
02cd4dc97f Fix GetChatAdministrators output type ChatMember => Vec<ChatMember> 2021-03-28 14:02:10 +03:00
Diego Roig
bebce82d22 document reqwest dependency fix 2021-03-26 17:14:10 -05:00
Waffle
59cb2939f8 Fix broken link in changelog 2021-03-22 11:05:00 +03:00
Waffle
b5003d8b34 Fix typo: ReplyMarkup::{keyboad => keyboard}
This commit adds `ReplyMarkup::keyboard}` and deprecates `ReplyMarkup::keyboad`.
2021-03-22 10:48:56 +03:00
Waffle
670979e5ca Release 0.2.1 2021-03-19 12:28:05 +03:00
Waffle
f4507bd3d2 Fix: types fields privacy (make fields of some types public)
The typos were found with `grep`:
```text
; grep -r -P "^    \w{2,}: .+, *$" ./src/types/*
./src/types/dice.rs:    emoji: DiceEmoji,
./src/types/dice.rs:    value: i32,
./src/types/keyboard_button.rs:    contact: Option<True>,
./src/types/keyboard_button.rs:    location: Option<True>,
./src/types/keyboard_button.rs:    poll: Option<KeyboardButtonPollType>,
./src/types/message.rs:    message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged,
./src/types/passport_element_error.rs:    message: String,
./src/types/passport_element_error.rs:    kind: PassportElementErrorKind,
./src/types/sticker_set.rs:    thumb: Option<PhotoSize>,
```

`src/types/keyboard_button.rs` can be ignored since in just contains private
helper structure.

Fields made public:
- `Dice::{emoji, value}`
- `MessageMessageAutoDeleteTimerChanged::message_auto_delete_timer_changed`
- `PassportElementError::{message, kind}`
- `StickerSet::thumb`
2021-03-19 12:28:05 +03:00
Waffle Lapkin
f3edcc2825
Add unnoticed change to changelog 2021-03-17 22:56:33 +03:00
Waffle
fd841ecd95 prepare for 0.2 release 2021-03-16 15:48:36 +03:00
Waffle
36557573aa Refactor ReplyMarkup
This commit tries to make using ReplyMarkup less noisy. It
- Renames `ReplyMarkup::{InlineKeyboardMarkup => InlineKeyboard, ReplyKeyboardMarkup => Keyboard, ReplyKeyboardRemove => KeyboardRemove}`
- Adds `inline_kb`, `keyboad`, `kb_remove` and `force_reply` `ReplyMarkup`
  consructors
- Renames `ReplyKeyboardMarkup` => `KeyboardMarkup`
- Renames `ReplyKeyboardRemove` => `KeyboardRemove`
- Removes useless generic param from `ReplyKeyboardMarkup::new` and
  `InlineKeyboardMarkup::new`
- Changes parameters order in `ReplyKeyboardMarkup::append_to_row` and
  `InlineKeyboardMarkup::append_to_row`
2021-03-16 15:14:32 +03:00
Waffle
aef88f97c3 Update to tba API version 5.1 2021-03-15 23:50:02 +03:00
Waffle
467477d38e Update changelog & readme 2021-03-14 22:59:49 +03:00
Temirkhan Myrzamadi
f87b4e51e6
Merge branch 'master' into fault_tolerant_get_updates 2021-03-06 12:11:38 +03:00
Waffle
7600a88312 Fix SetWebhook
Make `GetUpdates::allowed_updates` optional
2021-03-06 00:48:06 +03:00
Temirkhan Myrzamadi
b465da5f16 Derive Clone for AutoSend 2021-02-28 22:32:50 +06:00
Temirkhan Myrzamadi
c2aaa724f4 NonStrictVec -> SemiparsedVec 2021-02-27 18:52:11 +06:00