diff --git a/regexes.dhall b/regexes.dhall index ef9eb71..c56e92d 100644 --- a/regexes.dhall +++ b/regexes.dhall @@ -22,4 +22,5 @@ in [ Rule::{ regex = "(n|z)igg(er|a)", why = "racism" } , Rule::{ regex = "fat trixie", why = "icjb" } , Rule::{ regex = "soros", why = "conspiracy theories" } , Rule::{ regex = "(foal|loli)con", why = "illegal stuff" } + , Rule::{ regex = "cuck", why = "slur" } ] diff --git a/src/main.rs b/src/main.rs index e6ef753..b3b49ee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -242,6 +242,7 @@ async fn main() -> Result<()> { cfg.furbooru_api_key.clone(), )?; log::info!("listening on the firehose"); + let mut tries: u64 = 0; loop { if let Err(why) = cli @@ -260,6 +261,13 @@ async fn main() -> Result<()> { cfg.discord_webhook_url.clone(), Body::new(format!("firehose error:\n```\n{:#?}\n```", why)) ).await?; + + std::thread::sleep(std::time::Duration::from_millis(tries * 1000)); + if tries == 5 { + return Err(why); + } + + tries = tries + 1; } } }