1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
use anyhow::{bail, Context, Result};
use crate::core::Core;
use lazy_static::lazy_static;
use regex::Regex;
use sedregex::ReplaceCommand;
use std::borrow::Cow;
lazy_static! {
static ref RE_USERNAME: Regex = Regex::new(r"^@[a-zA-Z][a-zA-Z0-9_]+$").unwrap();
static ref RE_LINK: Regex = Regex::new(r"^https?://[a-zA-Z.0-9-]+/[-_a-zA-Z.0-9/?=]+$").unwrap();
static ref RE_IV_HASH: Regex = Regex::new(r"^[a-f0-9]{14}$").unwrap();
}
pub async fn start(core: &Core, sender: telegram_bot::UserId) -> Result<()> {
core.send("We are open. Probably. Visit [channel](https://t.me/rsstg_bot_help/3) for details.", Some(sender), None).await?;
Ok(())
}
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
use anyhow::{bail, Context, Result};
use crate::core::Core;
use lazy_static::lazy_static;
use regex::Regex;
use sedregex::ReplaceCommand;
use std::borrow::Cow;
lazy_static! {
static ref RE_USERNAME: Regex = Regex::new(r"^@[a-zA-Z][a-zA-Z0-9_]+$").unwrap();
static ref RE_LINK: Regex = Regex::new(r"^https?://[a-zA-Z.0-9-]+/[-_a-zA-Z.:0-9/?=]+$").unwrap();
static ref RE_IV_HASH: Regex = Regex::new(r"^[a-f0-9]{14}$").unwrap();
}
pub async fn start(core: &Core, sender: telegram_bot::UserId) -> Result<()> {
core.send("We are open. Probably. Visit [channel](https://t.me/rsstg_bot_help/3) for details.", Some(sender), None).await?;
Ok(())
}
|