Implement Dialogue::chat_id

This commit is contained in:
Hirrolot 2022-04-07 18:35:52 +06:00
parent 7abbd2dc09
commit c52325b788

View file

@ -124,6 +124,11 @@ where
Self { storage, chat_id, _phantom: PhantomData } Self { storage, chat_id, _phantom: PhantomData }
} }
/// Returns a chat ID associated with this dialogue.
pub fn chat_id(&self) -> i64 {
self.chat_id
}
/// Retrieves the current state of the dialogue or `None` if there is no /// Retrieves the current state of the dialogue or `None` if there is no
/// dialogue. /// dialogue.
pub async fn get(&self) -> Result<Option<D>, S::Error> { pub async fn get(&self) -> Result<Option<D>, S::Error> {