mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 06:51:01 +01:00
Remove methods for creating InlineQuery
This commit is contained in:
parent
44d4603bd0
commit
9131ccd6e5
2 changed files with 6 additions and 55 deletions
|
@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## unreleased
|
## unreleased
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
- Methods for creating `InlineQuery` ([#246][pr244])
|
||||||
|
|
||||||
|
[pr244]: https://github.com/teloxide/teloxide-core/pull/246
|
||||||
|
|
||||||
## 0.7.1 - 2022-08-19
|
## 0.7.1 - 2022-08-19
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -33,58 +33,3 @@ pub struct InlineQuery {
|
||||||
/// from a secret chat.
|
/// from a secret chat.
|
||||||
pub chat_type: Option<ChatType>,
|
pub chat_type: Option<ChatType>,
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(waffle): remove
|
|
||||||
impl InlineQuery {
|
|
||||||
pub fn new<S1, S2, S3>(id: S1, from: User, query: S2, offset: S3) -> Self
|
|
||||||
where
|
|
||||||
S1: Into<String>,
|
|
||||||
S2: Into<String>,
|
|
||||||
S3: Into<String>,
|
|
||||||
{
|
|
||||||
Self {
|
|
||||||
id: id.into(),
|
|
||||||
from,
|
|
||||||
location: None,
|
|
||||||
query: query.into(),
|
|
||||||
offset: offset.into(),
|
|
||||||
chat_type: None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn id<S>(mut self, val: S) -> Self
|
|
||||||
where
|
|
||||||
S: Into<String>,
|
|
||||||
{
|
|
||||||
self.id = val.into();
|
|
||||||
self
|
|
||||||
}
|
|
||||||
|
|
||||||
#[must_use]
|
|
||||||
pub fn from(mut self, val: User) -> Self {
|
|
||||||
self.from = val;
|
|
||||||
self
|
|
||||||
}
|
|
||||||
|
|
||||||
#[must_use]
|
|
||||||
pub fn location(mut self, val: Location) -> Self {
|
|
||||||
self.location = Some(val);
|
|
||||||
self
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn query<S>(mut self, val: S) -> Self
|
|
||||||
where
|
|
||||||
S: Into<String>,
|
|
||||||
{
|
|
||||||
self.query = val.into();
|
|
||||||
self
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn offset<S>(mut self, val: S) -> Self
|
|
||||||
where
|
|
||||||
S: Into<String>,
|
|
||||||
{
|
|
||||||
self.offset = val.into();
|
|
||||||
self
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue