Commit graph

256 commits

Author SHA1 Message Date
Hirrolot
a0fc39bc51 Document teloxide::handler! in the changelog 2022-03-26 14:59:51 +06:00
Hirrolot
f5653c747d Remove support for the old dispatching 2022-03-24 17:25:42 +06:00
Waffle Maybe
85287ffad3
Update CHANGELOG.md 2022-03-23 10:47:56 +04:00
Hirrolot
7aa0439afd Release v0.7.2 2022-03-22 11:40:53 +06:00
Waffle Maybe
a4c147538b
Merge pull request #559 from teloxide/deprecate_enable_logging
Deprecate `enable_logging!` in favour of configuring logging yourself
2022-03-21 21:12:04 +04:00
Waffle Maybe
29415a6d87
Update CHANGELOG.md
Co-authored-by: Hirrolot <hirrolot@gmail.com>
2022-03-21 19:31:44 +04:00
Hirrolot
1f95c1d2b3 Don't warn abount unhandled updates in repls2 2022-03-21 21:11:46 +06:00
Maybe Waffle
dbc7633fdb Deprecate enable_logging! in favour of configuring logging yourself 2022-03-21 18:55:34 +04:00
Hirrolot
81fbb1769c
Merge pull request #558 from teloxide/log-dispatcher-error
Log `UpdateKind::Error` in `dispatching2`
2022-03-21 07:48:38 -07:00
Hirrolot
91f8eb6acc Log UpdateKind::Error in dispatching2 2022-03-21 20:40:04 +06:00
Hirrolot
7a7667fff9 Changelogify ?Sized in HandlerExt::enter_dialogue 2022-03-21 20:09:06 +06:00
Hirrolot
cf8c1b78b7 Rewrite examples/db_remember.rs to use ErasedStorage 2022-03-21 20:06:32 +06:00
Hirrolot
0b6e7acf9f Favour a default function instead of StorageExt 2022-03-21 18:09:36 +06:00
Hirrolot
c6f0cd9404 Implement ErasedStorage 2022-03-20 09:06:21 +06:00
Hirrolot
3ad74b6a9b Release v0.7.1 2022-03-09 20:42:12 +06:00
Maybe Waffle
31ff3a468d Fix compilation with non-default features 2022-03-08 12:20:01 +04:00
Hirrolot
f923114d20
Fix the changelog 2022-02-09 17:06:17 +06:00
Hirrolot
30d37741e4 Release v0.7.0 2022-02-09 08:38:57 +06:00
Hirrolot
62da2cacb8 Update the changelog 2022-02-07 15:58:34 +06:00
Maybe Waffle
675600bf74 Fix docs.rs build 2022-02-06 17:23:21 +03:00
Hirrolot
25db911829
Update the v0.6.0 release date 2022-02-06 18:33:01 +06:00
Hirrolot
9eac077ecd Release v0.6.0 2022-02-06 17:47:56 +06:00
Hirrolot
c0c18ebbdf Mention teloxide-core in the changelog 2022-02-06 17:32:30 +06:00
Hirrolot
672e879ffe Update CHANGELOG.md 2022-02-05 13:50:46 +06:00
Hirrolot
07b844db99 Add BotCommand::bot_commands 2022-02-05 02:18:47 +06:00
Hirrolot
735e6a41f2 Replace CARGO_PKG_NAME with CARGO_CRATE_NAME in logging 2022-02-05 01:07:28 +06:00
Maybe Waffle
a7182962f7 Fix polling's StopToken not being Send 2022-01-18 21:01:47 +03:00
Maybe Waffle
993e6e53aa Do not retry get_updates infinitely while stopping polling listener 2022-01-17 14:42:49 +03:00
Waffle Maybe
fb238ff656
Merge branch 'dev' into master-to-dev-1 2021-10-25 17:17:42 +03:00
Hirrolot
178937f9d7
Fix the patch release number (0.5.2 => 0.5.3) 2021-10-25 20:10:12 +06:00
Maybe Waffle
f31adc1bb2 Dump version (0.5.2 -> 0.5.3) 2021-10-25 15:52:57 +03:00
­
964323fca4
Fix compilation without ctrlc_handler feature
The feature gate is moved to the `dispatching` mod level.
Public exports are also covered by this flag now.
2021-10-25 02:12:11 +03:00
Waffle
a97050de24 Require that AsUpdateStream::Stream is Send 2021-09-04 14:05:18 +03:00
Waffle Lapkin
38c3d6e119
Remove square brackets from changelog 2021-08-31 18:38:21 +03:00
Hirrolot
2a6067fe94 Prepare for v0.5.2 2021-08-25 23:51:19 +06:00
Waffle
5e260d0afc Depend on a right futures version 2021-08-25 18:12:14 +03:00
Hirrolot
2ae7c10fc7 Update the v0.5.1 release date 2021-08-05 23:10:40 +06:00
Hirrolot
a35667ac2b Prepare for v0.5.1 2021-08-01 20:45:59 +06:00
Waffle
b984464a79 Improve log messages when ^C is received with ^C handler setted up
Now they tell the user to not repeatedly press `^C` since only the first
signal actually does anything, all subsequesnt ones are ignored.
2021-07-21 15:53:52 +03:00
Hirrolot
674b1f974a Prepare for v0.5.0 2021-07-08 15:22:13 +06:00
Waffle
369e43aa7e Update dependencies 2021-07-05 21:29:36 +03:00
Waffle Lapkin
f69abcc938
Update CHANGELOG.md 2021-07-04 10:29:46 +03:00
dracarys18
1f1a3abd6b utils: Change the user_id type to i64
user_id is of type i64 in User struct (bd104a0a08/src/types/user.rs (L10))

Signed-off-by: dracarys18 <karthihegde010@gmail.com>
2021-07-03 17:31:57 +05:30
Kartikeya Hegde
0a89f46702
Update CHANGELOG.md
Co-authored-by: Hirrolot <hirrolot@gmail.com>
2021-06-30 19:47:43 +05:30
dracarys18
9476636d73 Update changelog 2021-06-30 19:44:12 +05:30
Waffle
faef0c6ffb Implement automatic update filtering
Add `UpdateListener::hint_allowed_updates` and `StatefulListener::hint_allowed_updates`.

Make `Dispatcher` call `UpdateListener::hint_allowed_updates` when starting dispatching.
2021-06-27 15:07:21 +03:00
Hirrolot
a6c480930a Print info about graceful shutdown to users 2021-06-27 15:44:46 +06:00
Waffle
8796bc11ba Update changelog 2021-06-27 11:04:55 +03:00
Waffle
f0de55ad55 Add Dispatcher::setup_ctrlc_handler function.
This function sets up `^C` handler which shuts down dispatching.
2021-06-25 16:57:24 +03:00
Waffle
41a95079b2 Add Dispatcher::shutdown function
This function allows to gracefuly shutdown dispatching.
2021-06-25 16:57:24 +03:00
Waffle
aeca45a579 Refactor UpdateListner trait
Instead of `Stream` super trait we now require `for<'a> AsUpdateStream<'a, E'>`
as a super trait. `AsUpdateStream` in turn provides `as_stream` function which
takes `&mut self` and returns `Self::Stream` (the trait is needed to workaround
lack of GAT).

This patch also adds a `stop` function that allows stopping the listener.

Since `UpdateListner` now isn't `Stream` and required methods, it's blanked
implementation for streams was removed.

`polling` and `polling_default` functions now also require `R: 'static`.
2021-06-25 16:57:24 +03:00
Waffle Lapkin
f911ab9974
Remove duplicate from README 2021-05-08 16:31:19 +03:00
Temirkhan Myrzamadi
27eda5759c RowNotFound -> DialogueNotFound 2021-05-08 19:00:38 +06:00
Temirkhan Myrzamadi
08bf40e555 Fail Storage::remove_dialogue if a dialogue doesn't exist 2021-05-08 17:21:24 +06:00
Temirkhan Myrzamadi
ef8c8f4cb5 Revert CHANGELOG.md
This fix affects only the current dev branch.
2021-04-22 05:45:05 +06:00
Temirkhan Myrzamadi
9e0de46918 Always remove a dialogue in SqliteStorage::remove_dialogue 2021-04-22 05:42:05 +06:00
Temirkhan Myrzamadi
617c861d26 Mark all the functions of Storage as #[must_use] 2021-04-03 06:53:02 +06:00
Hirrolot
701dcbcb68 Amalgamate 'Fixed' sections in CHANGELOG.md 2021-03-28 16:39:11 +06:00
Hirrolot
75a36feca5
Merge branch 'dev' into fix-storage-persistency 2021-03-28 03:36:03 -07:00
Temirkhan Myrzamadi
68135d004f ToOwned<Owned = D> -> D: Clone 2021-03-28 16:30:12 +06:00
Temirkhan Myrzamadi
b7e2f14307 Automatically delete a webhook if it was set up 2021-03-28 08:51:57 +06:00
Temirkhan Myrzamadi
eac67af27a Update CHANGELOG.md 2021-03-28 08:30:05 +06:00
Temirkhan Myrzamadi
9b75378572 Fix the tests and examples 2021-03-28 08:20:35 +06:00
Temirkhan Myrzamadi
bf1ed601ac Fix the storage persistency bug 2021-03-28 05:34:25 +06:00
Diego Roig
10a7dfb721 remove reqwest dependency 2021-03-26 18:33:36 -05:00
Hirrolot
63611cc7ae
Fix the v0.4.0 release date (CHANGELOG.md) 2021-03-22 01:28:50 +06:00
Hirrolot
8522759e68
Get ready for v0.4.0 (#347)
* Get ready for v0.4.0

* Export teloxide_macros as macros in lib.rs

* Use tokio v1.3 in README.md

* Return the feature 'macros' back

* Export teloxide_macros::teloxide in the prelude

* Document the 'macros' feature in README.md

* Update src/lib.rs

Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>

* Update src/prelude.rs

Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>

* Propagate features from teloxide-core

* teloxide-core = 0.2.1

* Fix CI

* Require teloxide-core/auto_send instead of teloxide/auto-send

* default-features = false (teloxide-core)

* Specify each teloxide-core feature separately

* Fix Cargo.toml

* JSON -> Json, CBOR -> Cbor

* Update Cargo.toml

Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>

Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
2021-03-21 18:34:23 +06:00
Temirkhan Myrzamadi
86253edc92 Use Box<dyn Error + Send + Sync> in the examples 2021-03-19 17:58:22 +06:00
Temirkhan Myrzamadi
be7bec6fa9 Support UpdateKind::{MyChatMember, ChatMember} 2021-03-17 23:36:51 +06:00
Temirkhan Myrzamadi
6102a02ed4 Integrate teloxide-core 2021-03-06 03:18:03 +06:00
Waffle Lapkin
dbc03c0769
Merge branch 'dev' into fix-serde-export-master 2021-01-13 16:20:25 +03:00
Temirkhan Myrzamadi
086789e5ca serde::export -> std::fmt 2021-01-13 11:31:08 +06:00
Waffle Lapkin
89ae390dfe
Merge pull request #294 from teloxide/sqlite_storage
Sqlite storage v2
2020-11-04 12:01:21 +03:00
Temirkhan Myrzamadi
6e4b1ff2b3 Prepare for v0.3.3 2020-10-30 13:26:04 +06:00
Sergey Levitin
d0f727099c Update changelog 2020-10-24 20:08:00 +03:00
Temirkhan Myrzamadi
c40f15487a Fix conflicts in CHANGELOG.md 2020-10-23 09:02:00 +06:00
Waffle Lapkin
814adabdb6
Merge branch 'dev' into v0.3.1_release 2020-09-26 19:01:16 +03:00
Waffle
04f8ed5df7 v0.3.1 release 2020-08-25 17:45:16 +03:00
Waffle
2cdb200ccf update CHANGELOG.md with Bot::builder method 2020-08-21 14:35:14 +03:00
Waffle
b06d3e7b7e add edit-methods and TargetMessage refactoring changes to CHANGELOG.md 2020-08-10 18:36:43 +03:00
Temirkhan Myrzamadi
d7ad1f26ed
Update CHANGELOG.md 2020-08-02 13:16:53 +06:00
Temirkhan Myrzamadi
b98932437b
v0.3.0 CHANGELOG.md 2020-07-31 21:56:27 +06:00
Temirkhan Myrzamadi
6bb8482f3d Respect TELOXIDE_PROXY in Bot::from_env & BotBuilder 2020-07-31 21:34:48 +06:00
Temirkhan Myrzamadi
ba65a3371f Update CHANGELOG.md 2020-07-31 20:22:39 +06:00
Temirkhan Myrzamadi
1c1b2005b4 Update CHANGELOG.md 2020-07-31 18:48:15 +06:00
Temirkhan Myrzamadi
3cef2f9ca8 Update CHANGELOG.md 2020-07-30 20:22:31 +06:00
Temirkhan Myrzamadi
c81ec1602a Remove repl from prelude 2020-07-30 19:25:56 +06:00
Temirkhan Myrzamadi
461e1150e5 Add dispatching::repl 2020-07-30 18:54:48 +06:00
Temirkhan Myrzamadi
299427645f
Update CHANGELOG.md 2020-07-30 18:19:45 +06:00
Temirkhan Myrzamadi
9d6e5a38fb
Update CHANGELOG.md 2020-07-30 18:19:08 +06:00
Temirkhan Myrzamadi
f4a7941cd8
Update CHANGELOG.md 2020-07-30 18:18:45 +06:00
Temirkhan Myrzamadi
f1f2b5fcd0
Update CHANGELOG.md 2020-07-27 00:56:59 +06:00
Temirkhan Myrzamadi
af2aa218e7 #[teloxide(transition)] -> #[teloxide(subtransition)] 2020-07-27 00:52:03 +06:00
Temirkhan Myrzamadi
d43d74d80c SubTransition -> Subtransition, SubTransitionOutputType -> SubtransitionOutputType 2020-07-27 00:48:19 +06:00
Temirkhan Myrzamadi
472a955596
Update CHANGELOG.md 2020-07-26 14:56:30 +06:00
Temirkhan Myrzamadi
bf114de249 A nicer approach to manage dialogues via #[derive(Transition)] + #[teloxide(transition)] 2020-07-25 22:37:58 +06:00
Temirkhan Myrzamadi
b1c97600ae Update CHANGELOG.md 2020-07-24 18:36:24 +06:00
Temirkhan Myrzamadi
49b7a50218 Update CHANGELOG.md 2020-07-24 18:28:34 +06:00
Temirkhan Myrzamadi
23aa260d68 Extract Bot from Arc 2020-07-17 16:04:25 +06:00
Temirkhan Myrzamadi
8990b4a785 Implement a default ParseMode 2020-07-16 19:52:40 +06:00
p0lunin
0ba4db26e5 changelog 2020-07-06 16:05:53 +03:00
p0lunin
c7dbc869ba added changelog 2020-07-04 17:50:20 +03:00
Temirkhan Myrzamadi
8b55e32e59
Update CHANGELOG.md 2020-03-27 18:56:32 +06:00
Temirkhan Myrzamadi
9f69dee06e
Update CHANGELOG.md 2020-02-25 15:15:41 +06:00
Temirkhan Myrzamadi
a8e6ab4d68
Update CHANGELOG.md 2020-02-25 15:08:04 +06:00
Temirkhan Myrzamadi
f8d12f165e
Create CHANGELOG.md 2020-02-25 03:04:24 +06:00