Hirrolot
d25efa9e14
Document UpdateHandler
, DefaultHandler
2022-02-02 05:00:45 +06:00
Hirrolot
5101786d0b
requester
=> bot
2022-02-02 04:55:12 +06:00
Hirrolot
21eb048ca2
Decouple Dispatcher
from DispatcherBuilder
2022-02-02 04:51:36 +06:00
Hirrolot
e92eef4a7c
Document some stuff
2022-01-31 19:23:47 +06:00
Hirrolot
2058395d54
Add Me
into the dependencies
2022-01-28 20:52:01 +06:00
Hirrolot
58311ef608
Add Update
& UpdateFilterExt
to prelude2
2022-01-26 15:51:43 +06:00
Hirrolot
b1fac57c94
Merge pull request #500 from teloxide/fix_stop_token_sendness
...
Fix `polling`'s `StopToken` not being `Send`
2022-01-26 12:34:32 +06:00
Maybe Waffle
e83688d4d3
Add toolchain file and fix formatting
2022-01-25 21:07:30 +03:00
Maybe Waffle
ea5eb16276
Clarify StatefulListener
docs a little
2022-01-25 20:38:59 +03:00
Maybe Waffle
755ec44aea
Cleanup update_listeners
docs
2022-01-25 20:25:19 +03:00
Hirrolot
cd51bba180
Refactor Dispatcher
2022-01-24 13:20:13 +06:00
Hirrolot
7d6c374828
Accept the handler as a parameter in Dispatcher::new
2022-01-23 20:58:55 +06:00
Hirrolot
ad88db96b6
Add UpdateFilterExt
2022-01-23 20:38:12 +06:00
Hirrolot
01c43dd360
Refactor MessageFilterExt
2022-01-23 20:15:27 +06:00
Maybe Waffle
a7182962f7
Fix polling
's StopToken
not being Send
2022-01-18 21:01:47 +03:00
Maybe Waffle
993e6e53aa
Do not retry get_updates
infinitely while stopping polling listener
2022-01-17 14:42:49 +03:00
Hirrolot
cc0e21c9f8
Remove Dispatcher::without_error_handler
2022-01-16 19:51:36 +06:00
Hirrolot
bacea51adc
Expose DefaultHandler
, UpdateHandler
out of dispatcher.rs
2022-01-16 19:50:39 +06:00
Hirrolot
2ad4e9a9f7
Define Dispatcher
handlers via a macro
2022-01-16 18:26:37 +06:00
p0lunin
1be9dd9a48
import MessageFilterExt in the prelude2.rs
2022-01-12 15:44:31 +02:00
p0lunin
3042dcada5
add Dispatcher::error_handler
2022-01-12 14:07:30 +02:00
p0lunin
bbd8f4d5ec
add MessageFilterExt
2022-01-12 14:07:18 +02:00
p0lunin
5fb673a87f
fix bug with callback_queries_handler
2022-01-12 12:36:42 +02:00
Maybe Waffle
d5392fddab
Update teloxide-core
yet again
2022-01-12 12:50:35 +03:00
p0lunin
7615fc1392
fix clippy errors
2022-01-06 15:12:57 +02:00
p0lunin
d7386a7dc1
remove old_dispatching
feature, add prelude2
and repls2
modules
2022-01-06 14:50:59 +02:00
p0lunin
a8098350fc
Merge branch 'dev' into dispatching2
...
# Conflicts:
# Cargo.toml
# examples/dialogue_bot/Cargo.toml
# examples/inline_bot/src/main.rs
# src/dispatching/mod.rs
# src/lib.rs
2022-01-06 14:25:01 +02:00
p0lunin
dac969250d
update rest of handlers in the Dispatcher
2022-01-05 20:33:48 +02:00
p0lunin
e2891d6d00
remove #[out()] attribute
2021-12-29 14:21:37 +02:00
p0lunin
72dfef4963
added DialogueState macro
2021-12-29 13:33:51 +02:00
p0lunin
6c0f1b9fc4
Added handler_factory.rs
2021-12-28 18:24:56 +02:00
Maybe Waffle
edecf5975f
Update teloxide-core
to the latest git version
2021-12-28 17:31:33 +03:00
Hirrolot
b253b7eec2
Don't define async fn run()
...
rustc now emits enough good compiler error messages for procedural macros such as `#[tokio::main]`.
2021-12-27 21:13:46 +06:00
p0lunin
b10288f751
remove unused imports
2021-12-26 20:06:21 +02:00
p0lunin
4452631fcc
fix repls
2021-12-26 19:59:13 +02:00
p0lunin
a644d0b6d2
added handler_ext.rs, updated dptree version
2021-12-26 16:55:24 +02:00
p0lunin
6959d1c928
added dialogues + updated sqlite_remember_bot example.
2021-12-15 13:46:32 +02:00
p0lunin
3f1d1360c6
fmt
2021-12-11 13:11:44 +02:00
p0lunin
635c18142a
1. Bump futures to 0.3.15 version (Abortable::is_aborted()).
...
2. Fix simple_commands_bot example.
2021-12-11 13:11:25 +02:00
p0lunin
4752b22c43
1. Change feature dispatching2 -> old_dispatching.
...
2. Added command repls.
3. Added function BotCommand::ty() due to new restrictions in the command repls.
2021-12-11 12:46:44 +02:00
p0lunin
93ed028e44
added dispatching2
feature, implemented standard repls
2021-11-25 13:44:55 +02:00
p0lunin
14083c8300
Many improvements of Dispatcher
, also made many dispatcher::*
methods and types pub(crate) for using in dispatching2 module
2021-11-25 12:59:54 +02:00
p0lunin
887b24d27f
Initial commit.
...
1. Added `dptree` dependency.
2. Added `dispatching2` module.
2. Added `Dispatcher` and `Handlers` types, which is similar to `dispatching::Dispatcher` type.
2021-11-13 12:35:56 +02:00
Waffle Maybe
fb238ff656
Merge branch 'dev' into master-to-dev-1
2021-10-25 17:17:42 +03:00
Maybe Waffle
f6c4701932
fix clippy
2021-10-25 15:50:04 +03:00
964323fca4
Fix compilation without ctrlc_handler feature
...
The feature gate is moved to the `dispatching` mod level.
Public exports are also covered by this flag now.
2021-10-25 02:12:11 +03:00
a7049c9e7d
Docs: Add missing features description
2021-10-23 01:56:17 +03:00
Maybe Waffle
fc4bb6be14
fix clippy
2021-10-10 15:15:16 +03:00
Waffle
a97050de24
Require that AsUpdateStream::Stream
is Send
2021-09-04 14:05:18 +03:00
Waffle
18cfb675bf
Fix doc(cfg) annotation
2021-09-04 14:00:43 +03:00
Waffle
a2bfdf850a
Suppress clippy false positive
2021-08-19 12:03:35 +03:00
Waffle
b984464a79
Improve log messages when ^C
is received with ^C
handler setted up
...
Now they tell the user to not repeatedly press `^C` since only the first
signal actually does anything, all subsequesnt ones are ignored.
2021-07-21 15:53:52 +03:00
Waffle
81775a7217
Show "This is supported on feature="..." only." in socs of reexported teloxide-core items
2021-07-07 20:27:38 +03:00
dracarys18
4c480a1714
Merge github.com:teloxide/teloxide into dev
2021-07-04 09:17:41 +05:30
Waffle
39e0ee094a
Ignore buggy nonstandard_macro_braces clippy lint
2021-07-04 00:22:11 +03:00
dracarys18
1f1a3abd6b
utils: Change the user_id type to i64
...
user_id is of type i64 in User struct (bd104a0a08/src/types/user.rs (L10)
)
Signed-off-by: dracarys18 <karthihegde010@gmail.com>
2021-07-03 17:31:57 +05:30
dracarys18
6bb18ea40b
Add reply shortcuts for every kind of message
...
Signed-off-by: dracarys18 <karthihegde010@gmail.com>
2021-06-30 17:59:07 +05:30
Hirrolot
01d1c8c95b
Merge pull request #403 from teloxide/hint_allowed_updates
...
Implement automatic update filtering
2021-06-27 18:56:48 +06:00
Waffle
7859294ff6
Apply suggestion from the review
2021-06-27 15:52:23 +03:00
Waffle
faef0c6ffb
Implement automatic update filtering
...
Add `UpdateListener::hint_allowed_updates` and `StatefulListener::hint_allowed_updates`.
Make `Dispatcher` call `UpdateListener::hint_allowed_updates` when starting dispatching.
2021-06-27 15:07:21 +03:00
Hirrolot
c5ac8b5f9c
Emit graceful shutdown info in all cases
2021-06-27 16:36:36 +06:00
Hirrolot
a6c480930a
Print info about graceful shutdown to users
2021-06-27 15:44:46 +06:00
Hirrolot
afe5a9716b
Enhance the docs
2021-06-27 14:57:02 +06:00
Waffle
558e7d5a72
Add IdleShutdownError
2021-06-27 10:50:47 +03:00
Waffle
0347f9e627
Replace ShutdownError
with ()
2021-06-26 23:21:44 +03:00
Waffle
483e544223
Apply suggestions from the review: rename AtomicShutdownState => DispatcherState, IsntRunning => Idle
2021-06-26 23:04:36 +03:00
Waffle
1795cb22c2
setup ^C handler in repls
2021-06-26 17:19:56 +03:00
Waffle
49848abd61
Doc fixes
2021-06-26 15:33:33 +03:00
Waffle
8e3ef4ab67
Minor Dispatcher
cleanup
2021-06-26 15:08:32 +03:00
Waffle
7cfb207b44
Wait for handlers to finish before shutting down dispatcher
...
This commit makes `Dispatcher::dispatch_with_listener` (and all it's derivatives
like `Dispatcher::dispatch`, `teloxide::repl`) to wait for handlers to finish
berfore shutting down.
This commit also changes self-type for `Dispatcher::dispatch_with_listener` and
`Dispatcher::dispatch` from `&Self` to `&mut Self` (this is required to wait
for handlers to finish).
Since unique reference is now required for listening,`Dispatcher::shutdown`
function is removed.
2021-06-26 14:33:10 +03:00
Waffle
569ef222fc
Add dispatcher shutdown token
...
This commit adds `ShutdownToken` which can be obrained throught
`Dispatcher::shutdown_token` and then later be used to shutdown dispatching.
2021-06-25 17:41:02 +03:00
Waffle
c378d6ef4e
Make StatefulListener::new
a little more convinient
...
Remove `timeout_hint` from the `StatefulListener::new` function. This parameter
is confusing and is likely to be set to `None` in most cases.
Add a `StatefulListener::new_with_timeout_hint` parameter which is the same as
the old `StatefulListener::new`.
2021-06-25 17:24:31 +03:00
Waffle
76dee997e0
Fix webhook examples (support graceful shutdown)
2021-06-25 16:57:24 +03:00
Waffle
8785b8263c
Fix overflow in dispatch_with_listener
2021-06-25 16:57:24 +03:00
Waffle
f58ae9b9ca
Make StatefulListener pub
2021-06-25 16:57:24 +03:00
Waffle
881aa3d6b6
Split update_listeners
into multiple modules
2021-06-25 16:57:24 +03:00
Waffle
a162478346
Switch graceful shutdown to cancelation token-like system
2021-06-25 16:57:24 +03:00
Waffle Lapkin
a8306ec3ff
Apply suggestions from code review
...
Co-authored-by: Hirrolot <hirrolot@gmail.com>
2021-06-25 16:57:24 +03:00
Waffle
00093664c7
Remove use of unstable feature (duration_zero)
...
The feature has been stabilized in 1.53.
2021-06-25 16:57:24 +03:00
Waffle
a5192a9ecb
Clippy
2021-06-25 16:57:24 +03:00
Waffle
d745f9bdb1
Remove send! macro
2021-06-25 16:57:24 +03:00
Waffle
f0de55ad55
Add Dispatcher::setup_ctrlc_handler
function.
...
This function sets up `^C` handler which shuts down dispatching.
2021-06-25 16:57:24 +03:00
Waffle
41a95079b2
Add Dispatcher::shutdown function
...
This function allows to gracefuly shutdown dispatching.
2021-06-25 16:57:24 +03:00
Waffle
eae2bced6d
Simplify polling
a little bit
2021-06-25 16:57:24 +03:00
Waffle
9f5a222ed7
Add UpdateListener::timeout_hint
2021-06-25 16:57:24 +03:00
Waffle
c288a540b9
Store fetched updates in polling::State
...
This way updates aren't lost when the stream is dropped.
2021-06-25 16:57:24 +03:00
Waffle
aeca45a579
Refactor UpdateListner
trait
...
Instead of `Stream` super trait we now require `for<'a> AsUpdateStream<'a, E'>`
as a super trait. `AsUpdateStream` in turn provides `as_stream` function which
takes `&mut self` and returns `Self::Stream` (the trait is needed to workaround
lack of GAT).
This patch also adds a `stop` function that allows stopping the listener.
Since `UpdateListner` now isn't `Stream` and required methods, it's blanked
implementation for streams was removed.
`polling` and `polling_default` functions now also require `R: 'static`.
2021-06-25 16:57:24 +03:00
Hirrolot
0f857e944b
feature = "nightly"
=> all(docsrs, feature = "nightly")
2021-06-18 22:17:08 +06:00
Hirrolot
6a7ad31fc9
Place the comment above feature(doc_cfg)
2021-06-18 22:07:37 +06:00
Hirrolot
74348b7236
Remove feature(external_doc)
completely
2021-06-18 21:44:10 +06:00
Hirrolot
fb0b267b94
Fix the removed feature external_doc
2021-06-18 21:35:54 +06:00
Hirrolot
f4260ed078
Replace lockfree
with flurry
2021-06-18 20:53:03 +06:00
Hirrolot
1d5859507a
Remove feature(extended_key_value_attributes)
2021-05-20 21:54:41 +06:00
Waffle
9b34586a04
Normalize docs
2021-05-15 23:37:14 +03:00
Temirkhan Myrzamadi
c0e3064785
Fmt
2021-05-10 12:13:07 +06:00
Hirrolot
7f578a8918
Paraphrase src/utils/command.rs
...
Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
2021-05-09 23:06:35 -07:00
Temirkhan Myrzamadi
cf3639f68b
Document the "off" value as a command description
2021-05-10 08:55:43 +06:00
Temirkhan Myrzamadi
3b7ca4dabd
Merge
2021-05-08 19:02:35 +06:00
Temirkhan Myrzamadi
27eda5759c
RowNotFound -> DialogueNotFound
2021-05-08 19:00:38 +06:00
Hirrolot
de52ea25f9
Update src/dispatching/dialogue/storage/mod.rs
...
Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
2021-05-08 05:43:34 -07:00
Hirrolot
80e1afaeed
Update src/dispatching/dialogue/storage/in_mem_storage.rs
...
Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
2021-05-08 05:43:27 -07:00
Temirkhan Myrzamadi
d14e0a49e9
Merge branch 'fix-remove-dialogue-sqlite' of https://github.com/teloxide/teloxide into fix-remove-dialogue-sqlite
2021-05-08 18:41:53 +06:00
Temirkhan Myrzamadi
cb02b83520
Apply review suggestions
2021-05-08 18:41:34 +06:00
Hirrolot
94e61d3403
Refactor src/dispatching/dialogue/storage/redis_storage.rs
...
Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
2021-05-08 05:39:18 -07:00
Temirkhan Myrzamadi
5585143ac2
Don't capitalise letters after dashes
2021-05-08 18:21:11 +06:00
Temirkhan Myrzamadi
721feb0082
Fix the tests
2021-05-08 17:38:03 +06:00
Temirkhan Myrzamadi
58c8015e78
Re-export InMemStorageError unconditionally
2021-05-08 17:25:53 +06:00
Temirkhan Myrzamadi
08bf40e555
Fail Storage::remove_dialogue if a dialogue doesn't exist
2021-05-08 17:21:24 +06:00
Temirkhan Myrzamadi
9e0de46918
Always remove a dialogue in SqliteStorage::remove_dialogue
2021-04-22 05:42:05 +06:00
Temirkhan Myrzamadi
17d14d2d53
Yet another dirty hack to please rustfmt
2021-04-05 21:19:29 +06:00
Temirkhan Myrzamadi
bc9972bdf2
Move the features section to lib.rs
2021-04-05 19:48:56 +06:00
Temirkhan Myrzamadi
bf8d2fa51b
Paraphrase #[must_use]
2021-04-03 14:21:06 +06:00
Temirkhan Myrzamadi
44956a4f85
Add descriptions of #[must_use] in Storage
2021-04-03 13:28:26 +06:00
Temirkhan Myrzamadi
617c861d26
Mark all the functions of Storage as #[must_use]
2021-04-03 06:53:02 +06:00
Temirkhan Myrzamadi
fff0b670fb
Fix RedisStorage::update_dialogue
2021-03-29 12:20:17 +06:00
Hirrolot
ca60e52f43
Update src/dispatching/dialogue/storage/redis_storage.rs
...
Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
2021-03-28 22:18:47 -07:00
Hirrolot
75a36feca5
Merge branch 'dev' into fix-storage-persistency
2021-03-28 03:36:03 -07:00
Temirkhan Myrzamadi
68135d004f
ToOwned<Owned = D> -> D: Clone
2021-03-28 16:30:12 +06:00
Temirkhan Myrzamadi
b7e2f14307
Automatically delete a webhook if it was set up
2021-03-28 08:51:57 +06:00
Temirkhan Myrzamadi
9b75378572
Fix the tests and examples
2021-03-28 08:20:35 +06:00
Temirkhan Myrzamadi
01b7b91bda
Document how Storage failures are handled in DialogueDispatcher
2021-03-28 06:30:35 +06:00
Temirkhan Myrzamadi
abbbc41892
Fix RedisStorage, SqliteStorage
2021-03-28 06:20:13 +06:00
Temirkhan Myrzamadi
bf1ed601ac
Fix the storage persistency bug
2021-03-28 05:34:25 +06:00
Temirkhan Myrzamadi
580dfaeae6
Merge branch 'dev' into clarify-storage-purpose
2021-03-22 01:35:14 +06:00
Waffle Lapkin
101528e453
Resolve fixme ( #350 )
...
* Update redis
* Resolve fixme(waffle) related to building docs
* Fix broken links
* Reexport teloxide_core::prelude as `no_inline`
2021-03-22 00:43:19 +06:00
Hirrolot
8522759e68
Get ready for v0.4.0 ( #347 )
...
* Get ready for v0.4.0
* Export teloxide_macros as macros in lib.rs
* Use tokio v1.3 in README.md
* Return the feature 'macros' back
* Export teloxide_macros::teloxide in the prelude
* Document the 'macros' feature in README.md
* Update src/lib.rs
Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
* Update src/prelude.rs
Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
* Propagate features from teloxide-core
* teloxide-core = 0.2.1
* Fix CI
* Require teloxide-core/auto_send instead of teloxide/auto-send
* default-features = false (teloxide-core)
* Specify each teloxide-core feature separately
* Fix Cargo.toml
* JSON -> Json, CBOR -> Cbor
* Update Cargo.toml
Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
2021-03-21 18:34:23 +06:00
Hirrolot
68e3c5e089
Update src/prelude.rs
...
Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
2021-03-20 22:57:32 +06:00
Temirkhan Myrzamadi
86253edc92
Use Box<dyn Error + Send + Sync> in the examples
2021-03-19 17:58:22 +06:00
Temirkhan Myrzamadi
be7bec6fa9
Support UpdateKind::{MyChatMember, ChatMember}
2021-03-17 23:36:51 +06:00
Hirrolot
31e6fba58c
Update src/lib.rs
...
Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
2021-03-15 20:26:50 +06:00
Temirkhan Myrzamadi
62b979369f
Fix the doc tests
2021-03-15 20:21:50 +06:00
Temirkhan Myrzamadi
823f279a60
Fix the docs
2021-03-15 09:51:00 +06:00
Temirkhan Myrzamadi
34a2eee1fa
Apply review suggestions
2021-03-15 09:22:32 +06:00
Temirkhan Myrzamadi
36b314cdfc
Fix this fucking bullshit
2021-03-13 23:35:48 +06:00
Temirkhan Myrzamadi
b29ef34299
Fmt
2021-03-13 23:08:35 +06:00
Temirkhan Myrzamadi
5f96da0a5f
Fix the tests
2021-03-13 23:05:50 +06:00
Temirkhan Myrzamadi
1af0bfdcbc
Fix the examples
2021-03-13 22:13:24 +06:00
Temirkhan Myrzamadi
a6e0c48427
Fix the tests
2021-03-06 03:50:11 +06:00
Temirkhan Myrzamadi
6102a02ed4
Integrate teloxide-core
2021-03-06 03:18:03 +06:00
Temirkhan Myrzamadi
f33428be03
Update the dependencies
2021-02-22 08:14:33 +06:00
Waffle Lapkin
2a8f091495
fix fmt
2021-01-13 16:24:23 +03:00
Waffle Lapkin
dbc03c0769
Merge branch 'dev' into fix-serde-export-master
2021-01-13 16:20:25 +03:00
Temirkhan Myrzamadi
086789e5ca
serde::export -> std::fmt
2021-01-13 11:31:08 +06:00
Temirkhan Myrzamadi
0e5880af91
Clarify the purpose of Storage in the docs
2021-01-12 19:42:33 +06:00
ivan770
704418ca9f
Remove unnecessary allocation if trace level is not enabled
2020-11-19 16:54:46 +00:00
ivan770
aebb974e50
Use only one log message to nofity about dialogue transition
2020-11-18 14:04:12 +02:00
ivan770
cd2970c0f5
fmt
2020-11-18 10:19:21 +02:00
ivan770
f6a4882d1d
State that log crate is being used for logging
2020-11-18 10:09:54 +02:00
ivan770
f86217b0f9
Trace previous state on update
2020-11-18 09:56:57 +02:00
ivan770
5830ba2b32
Minor changes
...
Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
2020-11-18 09:33:45 +02:00
ivan770
e9b7ad9161
Basic implementation of TraceStorage
2020-11-17 21:46:21 +02:00
Waffle Lapkin
89ae390dfe
Merge pull request #294 from teloxide/sqlite_storage
...
Sqlite storage v2
2020-11-04 12:01:21 +03:00
Temirkhan Myrzamadi
1c23bdd525
Merge pull request #309 from teloxide/master
...
v0.3.3 (very big changes)
2020-10-30 13:42:34 +06:00
Temirkhan Myrzamadi
edb5d6ffa0
Make MessageDice.dice public
2020-10-30 13:21:03 +06:00
Lachezar Lechev
508f34148b
replace occurences of docsrs
and add FIXME
2020-10-26 12:12:06 +02:00
Lachezar Lechev
9ae81ac978
add doc(cfg) attributes
2020-10-25 17:55:04 +02:00
Sergey Levitin
32600ff8f6
Gardening + docs improvals
2020-10-25 11:50:47 +03:00
Sergey Levitin
633d5b0d64
Fix typo
2020-10-24 21:09:17 +03:00
Sergey Levitin
75c7899f2c
Actualize storages docs
2020-10-24 21:08:14 +03:00
Sergey Levitin
d5b86ac086
Get rid of an unnesessary TODO
2020-10-24 19:59:08 +03:00
Sergey Levitin
7ba0a5b5a4
Fix SQL syntax error
2020-10-23 22:26:27 +03:00
Temirkhan Myrzamadi
7b1fbabdcb
Merge pull request #301 from teloxide/master
...
v0.3.2
2020-10-23 11:58:02 +06:00
Temirkhan Myrzamadi
f785367bea
Add a missing trait bound
2020-10-23 08:38:00 +06:00
Temirkhan Myrzamadi
9e9f6c1991
Add LoginUrl::new
2020-10-23 08:18:57 +06:00
Sergey Levitin
844a198753
Cargo +nightly fmt, gardening
2020-10-22 23:19:39 +03:00
Sergey Levitin
f8a00e64d8
Update sqlite dialog after all serializations
2020-10-22 21:47:43 +03:00
Sergey Levitin
16b0b47ecf
Properly implement SqliteStorage methods
2020-10-22 21:30:34 +03:00
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