mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Merge pull request #182 from teloxide/fix-polling-default
Fix polling_default
This commit is contained in:
commit
578783e33e
1 changed files with 2 additions and 2 deletions
|
@ -116,11 +116,11 @@ pub trait UpdateListener<E>: Stream<Item = Result<Update, E>> {
|
|||
}
|
||||
impl<S, E> UpdateListener<E> for S where S: Stream<Item = Result<Update, E>> {}
|
||||
|
||||
/// Returns a long polling update listener with the default configuration.
|
||||
/// Returns a long polling update listener with `timeout` of 1 minute.
|
||||
///
|
||||
/// See also: [`polling`](polling).
|
||||
pub fn polling_default(bot: Arc<Bot>) -> impl UpdateListener<RequestError> {
|
||||
polling(bot, None, None, None)
|
||||
polling(bot, Some(Duration::from_secs(60)), None, None)
|
||||
}
|
||||
|
||||
/// Returns a long/short polling update listener with some additional options.
|
||||
|
|
Loading…
Reference in a new issue