Skip to content

Commit

Permalink
Made the prefixes case-insensitive again
Browse files Browse the repository at this point in the history
  • Loading branch information
1Git2Clone committed Jan 4, 2025
1 parent 42c6762 commit 37fe677
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ async fn main() -> Result<(), Error> {
prefix: None,
additional_prefixes: BOT_PREFIXES
.iter()
.map(|p| poise::Prefix::Literal(p))
.map(|p| {
poise::Prefix::Regex(
RegexBuilder::new(p).case_insensitive(true).build().unwrap(),
)
})
.collect::<Vec<poise::Prefix>>(),
mention_as_prefix: true,
case_insensitive_commands: true,
Expand Down
2 changes: 1 addition & 1 deletion src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ pub use sqlx::{
pub use lazy_static::lazy_static;
pub use rand::prelude::*;
pub use rayon::prelude::*;
pub use regex::Regex;
pub use regex::{Regex, RegexBuilder};

0 comments on commit 37fe677

Please sign in to comment.