This commit is contained in:
2023-09-14 21:47:17 +02:00
parent efa6c4b89a
commit aca73a3d80
27 changed files with 62 additions and 90 deletions

View File

@@ -11,7 +11,7 @@ pub enum AnnotationCommand {
impl CommandParse<Self> for AnnotationCommand {
fn parse(s: &str, bot_name: &str) -> Result<Self, strum::ParseError> {
let re = Regex::new(r"^/(?P<an_type>a|b)_an_(?P<id>\d+)$")
let re = Regex::new(r"^/(?P<an_type>[ab])_an_(?P<id>\d+)$")
.unwrap_or_else(|_| panic!("Can't create AnnotationCommand regexp!"));
let full_bot_name = format!("@{bot_name}");