Commit graph

20 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
a137b41ab2 Use same identifiers across the examples 2022-10-03 17:07:38 +06:00
Hirrolot
00efbe163a Stop using AutoSend in the examples and docs 2022-09-29 09:37:20 +06:00
Maybe Waffle
376ffc85f9 Properly handle callback queries in examples/buttons.rs 2022-09-12 16:50:59 +04:00
Maybe Waffle
f39180543e Fix command parsing in examples/button.rs 2022-09-08 18:36:08 +04: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
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
968c988f7f Fix the lost stuff 2022-04-02 20:54:33 +06:00
Hirrolot
d4709c8061 Refactor examples/admin.rs and buttons.rs 2022-03-29 01:55:44 +06:00
Hirrolot
fa5d1f738b Remove support for the old dispatching 2022-03-29 01:55:09 +06:00
Maybe Waffle
86cc3d782f Add CommandDescription[s]
Add two new types - `CommandDescription` and `CommandDescriptions`, make
`BotCommands` return the latter.
2022-03-27 22:10:50 +04: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
Maybe Waffle
dbc7633fdb Deprecate enable_logging! in favour of configuring logging yourself 2022-03-21 18:55:34 +04:00
Hirrolot
9efa2f6cbd DispatcherBuilder::new => Dispatcher::builder 2022-02-04 20:09:53 +06:00
Hirrolot
47cc80d63e
Update examples/buttons.rs
Co-authored-by: Waffle Maybe <waffle.lapkin@gmail.com>
2022-02-04 16:46:26 +06:00
Hirrolot
6ad7a5b0a2 Fix Clippy 2022-02-03 20:48:40 +06:00
Hirrolot
3307a0915c Use .setup_ctrlc_handler() in the examples 2022-02-03 16:34:40 +06:00
Hirrolot
21eb048ca2 Decouple Dispatcher from DispatcherBuilder 2022-02-02 04:51:36 +06:00
Hirrolot
3b3f5f855f Make all examples just *.rs files 2022-02-02 03:54:00 +06:00
Renamed from examples/buttons/src/main.rs (Browse further)