Commit graph

17 commits

Author SHA1 Message Date
Hirrolot
5922984f6c Reorder parameters in the examples
In reordering the parameters, I stick the following principle: place parameters from least changing to most changing. Thus, we have config and bot right from the beginning, next a dialogue with a possible payload, and next updates such as messages, inline queries, etc. This principle is used in languages with a native support for currying, although in Rust people appear to order parameters arbitrarily, so this commit is mostly for the sake of consistency.
2022-10-03 17:54:06 +06:00
Hirrolot
00efbe163a Stop using AutoSend in the examples and docs 2022-09-29 09:37:20 +06:00
Maybe Waffle
dd4af30727 Move ctrlc handler enable function to DispatcherBuilder
This helps with consistency -- every setting is changed in builder.
Also `Self -> Self` function sometimes plays more nicely with borrowck.
2022-07-21 13:32:05 +04:00
Hirrolot
14e9fd2197 Use #[default] for State::Start in dialogues 2022-07-04 21:47:57 +06:00
Hirrolot
0d36a1e2b7
Merge pull request #613 from teloxide/dptree-case
Deprecate `teloxide::handler!` in favour of `dpree::case!`
2022-04-27 16:05:15 +06:00
Hirrolot
deb992c787 Deprecate teloxide::handler! in favour of dptree::case! 2022-04-27 15:16:34 +06:00
Hirrolot
b8c3f48c7f Harmonise example bot initial logs 2022-04-27 01:00:08 +06:00
Hirrolot
5838b31834 Capture identifier in format strings (examples/) 2022-04-03 16:06:44 +06:00
Hirrolot
62d4440c63 Fix examples/db_remember.rs 2022-04-02 21:41:04 +06:00
Hirrolot
9bb2a85aba Merge branch 'dev' into teloxide-handler 2022-04-02 21:32:59 +06:00
Hirrolot
fa5d1f738b Remove support for the old dispatching 2022-03-29 01:55:09 +06:00
Maybe Waffle
b3b8073a12 Rename BotCommand -> BotCommands (the trait)
This removes the ambiguity with `types::BotCommand` and also the new
name just makes more sense, since this trait is usually implemented for
enums that can be many different commands and not a single one.

Note: this requires changes in the `teloxide-macro` crate.
2022-03-27 22:10:50 +04:00
Hirrolot
363e0bff18 Update the examples to use teloxide::handler! 2022-03-26 14:57:30 +06:00
Hirrolot
f5653c747d Remove support for the old dispatching 2022-03-24 17:25:42 +06:00
Maybe Waffle
dbc7633fdb Deprecate enable_logging! in favour of configuring logging yourself 2022-03-21 18:55:34 +04:00
Hirrolot
cf8c1b78b7 Rewrite examples/db_remember.rs to use ErasedStorage 2022-03-21 20:06:32 +06:00
Hirrolot
7a932c8fd9 Merge examples/sqlite_remember.rs with redis_remember.rs 2022-03-12 14:33:38 +06:00
Renamed from examples/sqlite_remember.rs (Browse further)