diff options
Diffstat (limited to 'src/ext/framework/command.rs')
| -rw-r--r-- | src/ext/framework/command.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ext/framework/command.rs b/src/ext/framework/command.rs index 76ca416..5f43284 100644 --- a/src/ext/framework/command.rs +++ b/src/ext/framework/command.rs @@ -102,7 +102,9 @@ pub fn positions(ctx: &mut Context, content: &str, conf: &Configuration) -> Opti positions.push(mention_end); } else if let Some(ref func) = conf.dynamic_prefix { if let Some(x) = func(ctx) { - positions.push(x.len()); + if content.starts_with(&x) { + positions.push(x.len()); + } } else { for n in conf.prefixes.clone() { if content.starts_with(&n) { |