mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 15:35:35 +01:00
Enable new download pipeline
This commit is contained in:
@@ -67,6 +67,13 @@ pub struct StartDownloadData {
|
||||
pub id: u32,
|
||||
}
|
||||
|
||||
impl ToString for StartDownloadData {
|
||||
fn to_string(&self) -> String {
|
||||
let id = self.id;
|
||||
format!("/d_{id}")
|
||||
}
|
||||
}
|
||||
|
||||
impl CommandParse<Self> for StartDownloadData {
|
||||
fn parse(s: &str, bot_name: &str) -> Result<Self, strum::ParseError> {
|
||||
let re = Regex::new(r"^/d_(?P<book_id>\d+)$").unwrap();
|
||||
|
||||
Reference in New Issue
Block a user