Commit graph

1259 commits

Author SHA1 Message Date
Sergey Levitin
fb996d943d Fix typo 2020-10-19 02:34:48 +03:00
Sergey Levitin
e751624d6f Implement sqlite storage methods #144 2020-10-19 02:18:21 +03:00
Sergey Levitin
900ae4f630 Merge branch 'dev' of github.com:teloxide/teloxide into sqlite 2020-10-19 00:15:21 +03:00
Jaslo Ziska
03c21e4651
Fix documentation for methods using InputFile
This commit fixes https://github.com/teloxide/teloxide/issues/254
2020-10-03 17:23:40 +02:00
Jaslo Ziska
eed1bbb0fc
Conditionally add teloxide-macros crate and reexport macros
This commit adds the feature "macros" which conditionally adds the
teloxide-macros crate and reexports its macros.

All (doc) tests using these macros are also conditionally enabled now.
Also change examples accordingly.

This commit solves https://github.com/teloxide/teloxide/issues/283
2020-10-02 20:43:26 +02:00
Waffle Lapkin
0c6a81e1b6
Merge pull request #282 from teloxide/box-pin
Box::pin -> .boxed()
2020-10-01 18:15:12 +03:00
Temirkhan Myrzamadi
b17728d760 Remove an unused import 2020-10-01 18:19:52 +06:00
Temirkhan Myrzamadi
e6ceee752f Update CODE_STYLE.md 2020-10-01 17:58:26 +06:00
Temirkhan Myrzamadi
e33bbeb027 async { ... }.boxed() -> Box::pin(async { ... }) 2020-10-01 17:56:48 +06:00
Temirkhan Myrzamadi
9cb44bef0d Box::pin -> .boxed() 2020-09-27 06:53:43 +06:00
Waffle Lapkin
814adabdb6
Merge branch 'dev' into v0.3.1_release 2020-09-26 19:01:16 +03:00
Waffle
4fa2d30411 fmt 2020-08-25 18:21:34 +03:00
Temirkhan Myrzamadi
f571f377b4
Merge pull request #269 from teloxide/bot_builder_method
add `Bot::builder` method
2020-08-23 00:04:49 +06:00
Waffle Lapkin
de9ce863d5
Apply suggestions from code review
Co-authored-by: Temirkhan Myrzamadi <hirrolot@gmail.com>
2020-08-21 14:31:59 +03:00
Waffle Lapkin
ac4f7f88e7
Update src/bot/mod.rs
Co-authored-by: Temirkhan Myrzamadi <hirrolot@gmail.com>
2020-08-21 14:31:25 +03:00
Waffle
4c2681ca27 add Bot::builder method 2020-08-21 14:29:25 +03:00
Waffle
7527179f3f add deprecation note to Bot constructors 2020-08-17 18:21:41 +03:00
Waffle
3157305105 add automatic test of code blocks from readme 2020-08-12 23:21:13 +03:00
Waffle
b81bfd3b2a fix fmt 2020-08-10 18:39:30 +03:00
Waffle
02400b18ab remove TargetMessage as ChatOrInlineMessage reexport as it couldn't be deprecated
Also rename `TargetMessage::{Chat => Common}` variant.
(anyway `ChatOrInlineMessage`/`TargetMessage` refactoring is not backward compatible)
2020-08-10 18:27:53 +03:00
Waffle
851e4c6bc6 refactor ChatOrInlineMessage
- Rename `ChatOrInlineMessage` => `TargetMessage`
- Change type of `TargetMessage::inline_message_id` `i32` => `String`
- Remove `#[non_exhaustive]` annotation as this enum is unlikely to be changed in future
- Implement `From<String>`
- Use `From<String>` impl in `get_game_high_scores` and `set_game_score` methods
- Leave a deprecated pub use as `ChatOrInlineMessage` for a bit of backward compat
2020-08-10 18:05:49 +03:00
Waffle
503f406edd Fix edit_* and stop_inline_message_live_location methods
Previously they have been broken because of the wrong type of
`ChatOrInlineMessage::Inline::inline_message_id` (`i32` instead
of `String`), and wrong return type in case of inline editing
messages (`Message` instead of `True`).

This commit splits the methods into inline and non-inline
versions, fixing the issue.
2020-08-10 18:05:18 +03:00
Eoan Ermine
b1ac80e244 Fix code formatting, remove unused import 2020-08-07 12:02:30 +05:00
PatriotRossii
517afc0cfe
Remove unnecessary derefs 2020-08-07 06:08:22 +05:00
PatriotRossii
817f492223
Un Arc<_> Bot::parse_mode 2020-08-07 05:55:06 +05:00
Temirkhan Myrzamadi
05e32336fa Add requests::respond 2020-08-02 13:08:43 +06:00
DCjanus
6f13d38812 remove unnecessary type bound 2020-08-02 02:43:30 +08:00
Kirill Mironov
245355ea3e set default error type 2020-08-01 11:58:24 +03:00
Kirill Mironov
ffb5f29362 Allow for custom error types in TransitionOut 2020-08-01 00:18:52 +03:00
S-Y-rat
8413b6b2b7 Implemented connection tests 2020-07-31 21:37:35 +03:00
Kirill Mironov
08d0d7f2f4 Unpair TransitionOut from concrete Error type resolves #242 2020-07-31 21:10:29 +03:00
Temirkhan Myrzamadi
f2618ad7ed Fix wrong documentation about TELOXIDE_PROXY 2020-07-31 23:49:43 +06:00
Temirkhan Myrzamadi
6bb8482f3d Respect TELOXIDE_PROXY in Bot::from_env & BotBuilder 2020-07-31 21:34:48 +06:00
Temirkhan Myrzamadi
d4a14df5c8 Reduce duplication in bot/api.rs 2020-07-31 21:15:21 +06:00
S-Y-rat
c09eca1e39 Switch from rusqlite to sqlx with sqlite feature enabled 2020-07-31 15:59:26 +03:00
Temirkhan Myrzamadi
e2d536bc91 Update examples/dialogue_bot 2020-07-31 18:47:20 +06:00
Temirkhan Myrzamadi
13fb15f24e Fix compilation 2020-07-31 18:33:43 +06:00
S-Y-rat
d0ab14d593 Make sqlite-storage visible 2020-07-31 15:20:27 +03:00
Temirkhan Myrzamadi
114267f14c Push code 2020-07-31 17:40:02 +06:00
Temirkhan Myrzamadi
fda07ddd15 Fix one compilation error 2020-07-31 16:18:23 +06:00
Temirkhan Myrzamadi
3e01e0f65f Remove Arc from dialogues_repl 2020-07-31 16:16:14 +06:00
Temirkhan Myrzamadi
559d3344a2 Attempt to develop dialogue_repl(with_listener) 2020-07-31 14:56:41 +06:00
S-Y-rat
fc5c855a23 Sqlite-storage feature added 2020-07-31 09:31:08 +03:00
Temirkhan Myrzamadi
62bf55c8e6 Don't export REPLs to teloxide::dispatching 2020-07-31 00:56:39 +06:00
Temirkhan Myrzamadi
f5c7da2610 Document repl_with_listener 2020-07-31 00:45:31 +06:00
Temirkhan Myrzamadi
f29138f497 Add repl_with_listener 2020-07-31 00:29:31 +06:00
Temirkhan Myrzamadi
02c71f72cb Use the generic HandlerE in REPLs 2020-07-31 00:16:21 +06:00
Temirkhan Myrzamadi
2849c1cbde Fix the docs of REPLs 2020-07-30 23:52:10 +06:00
Temirkhan Myrzamadi
1ab789fd71 Add commands_repl_with_listener 2020-07-30 23:30:28 +06:00
Temirkhan Myrzamadi
ce32f75bed repl & commands_repl are not only for demonstrative purposes 2020-07-30 20:23:31 +06:00