More exceptions for spelling

The neverending project
This commit is contained in:
kageru 2022-06-08 17:43:21 +02:00
parent 0dffd77529
commit ed59982e80
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2

View File

@ -19,7 +19,7 @@ lazy_static! {
static ref MEME_CHANNEL: ChannelId =
ChannelId(std::env::args().nth(2).unwrap().parse().unwrap());
static ref RETARD_REGEX: Regex =
Regex::new("(?<!(. | j| d|op|in|us|ng|si|tw|dd))a( |$)").unwrap();
Regex::new("(?<!(. | j| d|op|in|us|ng|si|tw|dd|nd))a( |$)").unwrap();
}
#[async_trait]
@ -43,6 +43,8 @@ async fn handle_message(ctx: Context, message: Message) -> Result<(), serenity::
if message.author.id == 261246789942902794
&& RETARD_REGEX.is_match(&message.content).contains(&true)
&& !message.content.starts_with("a ")
&& !message.content.starts_with("ja ")
&& !message.content.starts_with("da ")
{
message.delete(&ctx).await?;
let fixed = fix_spelling(&message.content);