Hirrolot
50c7cfe9d2
Fix dispatcher's graceful shutdown
2022-04-09 02:33:52 +06:00
Hirrolot
f3b4769bc5
Mark Dialogue::{new, chat_id}
as #[must_use]
2022-04-08 00:03:27 +06:00
Hirrolot
c52325b788
Implement Dialogue::chat_id
2022-04-07 18:35:52 +06:00
Waffle Maybe
7abbd2dc09
Merge pull request #554 from teloxide/webhooks
...
Built-in webhook support
2022-04-07 16:31:26 +04:00
Maybe Waffle
bb7a4729c0
Remove the need for CacheMe
in dispatcher
2022-04-05 17:19:10 +04:00
Maybe Waffle
f83ff59709
Fix issues caused by the rebase
2022-04-05 16:42:52 +04:00
Maybe Waffle
0bddb1d927
Update changelog
2022-04-05 16:37:22 +04:00
Maybe Waffle
62052a822a
Remove unnecessary bounds
...
`UpdateListener::StopToken` is required to be `Send` anyway
2022-04-05 16:36:31 +04:00
Maybe Waffle
cf5cbe5a82
Add a workaround to stop webhook listener even when server is still run
2022-04-05 16:36:31 +04:00
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
2bdfcc9ca6
Move axum webhook impl into a sub-mod
2022-04-05 16:36:31 +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
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
9bb2a85aba
Merge branch 'dev' into teloxide-handler
2022-04-02 21:32:59 +06: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
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
fa5d1f738b
Remove support for the old dispatching
2022-03-29 01:55:09 +06: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
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
Maybe Waffle
ceb2415351
Require that UpdateListener::StopToken
is Send
2022-03-27 13:29:17 +04:00
Hirrolot
9cd4bb11b0
Implement teloxide::handler!
2022-03-26 14:56:53 +06:00
Hirrolot
f5653c747d
Remove support for the old dispatching
2022-03-24 17:25:42 +06:00
Hirrolot
85a04553a5
Document new command renaming rules
2022-03-23 08:03:15 +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
Hirrolot
de2974f052
Correct open issue suggestion (dispatching2
)
2022-03-21 22:10:45 +06:00
Hirrolot
43a9b2d327
Merge branch 'dev' into correct-open-issue-suggestion
2022-03-21 22:09:52 +06:00
Maybe Waffle
22e5165f89
Remove mentions of enable_logging!
from documentation/readme
2022-03-21 19:42:55 +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
be143a3f6e
Move ErasedStorage
upper
2022-03-21 20:18:36 +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
Waffle Maybe
9d9323648d
Correct open issue suggestion
2022-03-17 22:44:45 +04:00