More exceptions for spelling
The neverending project
This commit is contained in:
parent
0dffd77529
commit
ed59982e80
@ -19,7 +19,7 @@ lazy_static! {
|
|||||||
static ref MEME_CHANNEL: ChannelId =
|
static ref MEME_CHANNEL: ChannelId =
|
||||||
ChannelId(std::env::args().nth(2).unwrap().parse().unwrap());
|
ChannelId(std::env::args().nth(2).unwrap().parse().unwrap());
|
||||||
static ref RETARD_REGEX: Regex =
|
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]
|
#[async_trait]
|
||||||
@ -43,6 +43,8 @@ async fn handle_message(ctx: Context, message: Message) -> Result<(), serenity::
|
|||||||
if message.author.id == 261246789942902794
|
if message.author.id == 261246789942902794
|
||||||
&& RETARD_REGEX.is_match(&message.content).contains(&true)
|
&& RETARD_REGEX.is_match(&message.content).contains(&true)
|
||||||
&& !message.content.starts_with("a ")
|
&& !message.content.starts_with("a ")
|
||||||
|
&& !message.content.starts_with("ja ")
|
||||||
|
&& !message.content.starts_with("da ")
|
||||||
{
|
{
|
||||||
message.delete(&ctx).await?;
|
message.delete(&ctx).await?;
|
||||||
let fixed = fix_spelling(&message.content);
|
let fixed = fix_spelling(&message.content);
|
||||||
|
Loading…
Reference in New Issue
Block a user