implement item_name_regex option

This commit is contained in:
yggverse 2026-04-07 12:05:13 +03:00
parent f52fe3a710
commit 93f9bc4fee
5 changed files with 30 additions and 0 deletions

View file

@ -48,6 +48,18 @@ async fn main() {
debug!("items limit for channel `{c}` reached at {i}; break.");
break;
}
if !channel
.item_name_regex
.as_ref()
.is_some_and(|regex| regex.is_match(&item.name))
{
debug!(
"item name `{}` for channel `{c}` does not match pattern `{}`; skip.",
&item.name,
&channel.item_name_regex.as_ref().unwrap()
);
continue;
}
match database.get(&item.id) {
Ok(id) => {
if id.is_some() {