Commit graph

2879 commits

Author SHA1 Message Date
Maybe Waffle
cca08ae43c Remove Option<> from webhooks::Options::drop_pending_updates 2022-04-05 16:36:31 +04:00
Maybe Waffle
7e44ab8c11 Add max_connections to the webhooks::Options 2022-04-05 16:36:31 +04:00
Maybe Waffle
4abafbcacc Write documentation for webhooks 2022-04-05 16:36:31 +04:00
Maybe Waffle
e951af7abe Fix ngrok_ping_pong example required-features
...and info! message
2022-04-05 16:36:31 +04:00
Maybe Waffle
2bdfcc9ca6 Move axum webhook impl into a sub-mod 2022-04-05 16:36:31 +04:00
Maybe Waffle
37d1252bc9 Use new built-in webhooks in ngrok example
I've also changed the port from 80 to 8443, since 80 usually requires
root privileges.
2022-04-05 16:36:22 +04:00
Maybe Waffle
d576d829f1 Allow using axum-based webhooks with existing server
Add `webhooks::{axum_to_router, axum_no_setup}` functions that allow for
more granular control over webhooks:
- `axum_to_router` - do not start the server, only setup webhook and
  return the components
- `axum_no_setup` same as `axum_to_touter` but also do not setup webhook

Also fix `StopToken` sendness.
2022-04-05 16:32:09 +04:00
Maybe Waffle
b86b2f67f3 Add built-in support for webhooks
This commit adds built-in support for webhooks based on the `axum`
framework under a new "webhooks-axum" feature.

API: `update_listeners::webhooks` module with `Options` (a common struct
that stores all webhook related settings) and `axum` (function that
implements webhook).
2022-04-05 16:32:06 +04:00
Waffle Maybe
038b5a1ae2
Merge pull request #575 from teloxide/WaffleLapkin-patch-42
change the link and wording about the vuln in the readme
2022-04-03 23:37:56 +04:00
Waffle Maybe
1e6bf831d8
change the link and wording about the vuln in the readme 2022-04-03 23:09:20 +04:00
Waffle Maybe
e66bd26d20
Merge pull request #573 from teloxide/update_teloxide_core
Release `0.7.3`
2022-04-03 16:29:18 +04:00
Maybe Waffle
99c8995bb3 Release 0.7.3 2022-04-03 16:19:17 +04:00
Hirrolot
140141f6fc
Merge pull request #572 from teloxide/beautify-string-literals
Capture identifiers in format strings
2022-04-03 03:35:56 -07:00
Hirrolot
5838b31834 Capture identifier in format strings (examples/) 2022-04-03 16:06:44 +06:00
Hirrolot
c893309bc2
Merge pull request #570 from teloxide/teloxide-handler
Implement `teloxide::handler!`
2022-04-03 02:33:13 -07:00
Hirrolot
b88f73b35f Fix examples/dialogue.rs according to teloxide::handler! 2022-04-03 01:50:53 +06:00
Hirrolot
d3f1cbfbb2 Clarify the docs of teloxide::handler! 2022-04-03 01:38:25 +06:00
Hirrolot
618be35803 Fix trailing comma issues in teloxide::handler! 2022-04-03 01:11:17 +06:00
Hirrolot
45e7a4274c dptree:: => $crate::dptree:: 2022-04-02 22:26:22 +06:00
Hirrolot
7c523d2b4b $($variant:ident)::* => $($variant:ident)::+ 2022-04-02 22:25:27 +06:00
Hirrolot
b27e7582d3 #[cfg(all(feature = "ctrlc_handler"))] => #[cfg(feature = "ctrlc_handler")] again 2022-04-02 22:23:48 +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
fd18f9b2dd
Merge pull request #566 from teloxide/remove-old-dispatching
Remove old dispatching
2022-04-02 08:12:27 -07:00
Hirrolot
2f5ce528df Fix the repl_is_send test 2022-04-02 21:03:54 +06:00
Hirrolot
968c988f7f Fix the lost stuff 2022-04-02 20:54:33 +06:00
Hirrolot
56c1c55f88 Update README.md 2022-04-02 15:51:59 +06:00
Hirrolot
5000c4cec4 Some fixing stuff lol 2022-04-02 15:34:43 +06:00
Hirrolot
18651a8253 Some REPLs twiddling 2022-03-29 02:10:19 +06:00
Hirrolot
4af85f3d5b Remove the dependency requirements notice for commands_repl 2022-03-29 02:03:35 +06:00
Hirrolot
0c1e5c1958 Fix fucked up examples/admin.rs 2022-03-29 02:01:00 +06:00
Hirrolot
a389ed4150 Update the changelog 2022-03-29 01:57:45 +06:00
Hirrolot
d4709c8061 Refactor examples/admin.rs and buttons.rs 2022-03-29 01:55:44 +06:00
Hirrolot
ae227be4f0 Use std::error::Error instead of anyhow in the examples 2022-03-29 01:55:09 +06:00
Hirrolot
fa5d1f738b Remove support for the old dispatching 2022-03-29 01:55:09 +06:00
Waffle Maybe
30059b3455
Merge pull request #550 from teloxide/bot_command_better_descriptions
Refactor `BotCommand` trait & related stuff
2022-03-27 22:30:11 +04:00
Maybe Waffle
ed40e2ad3b fix clippy 2022-03-27 22:11:17 +04:00
Maybe Waffle
6922128cb6 Fix some places with remaining BotCommand (w/o s) 2022-03-27 22:11:17 +04:00
Maybe Waffle
91bea5be5e Apply suggestions from the review
- remove `username_from_bot`
- add `username_from_me`
2022-03-27 22:11:17 +04:00
Maybe Waffle
a5aada3dc7 Update changelog 2022-03-27 22:11:15 +04:00
Maybe Waffle
3c97ed83f4 Cleanup files when testing sqlite storage 2022-03-27 22:10:50 +04:00
Maybe Waffle
8ae3222409 Disable redis tests outside of CI
...to not annoy people like me who don't have redis open while testing
2022-03-27 22:10:50 +04:00
Maybe Waffle
484d1ccd83 Fixup documentation 2022-03-27 22:10:50 +04: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
8116059ba3 Document BotCommand methods 2022-03-27 22:10:50 +04:00
Waffle Maybe
5bd134bc21
Merge pull request #568 from teloxide/stop_send
Require that `UpdateListener::StopToken` is `Send`
2022-03-27 21:48:17 +04:00
Maybe Waffle
ceb2415351 Require that UpdateListener::StopToken is Send 2022-03-27 13:29:17 +04:00
Hirrolot
a0fc39bc51 Document teloxide::handler! in the changelog 2022-03-26 14:59:51 +06:00
Hirrolot
363e0bff18 Update the examples to use teloxide::handler! 2022-03-26 14:57:30 +06:00