mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
Merge pull request #101 from neilmiddleton/nm-issue-83
Make `!mjolnir` not case sensitive
This commit is contained in:
commit
150be16cb1
@ -84,7 +84,7 @@ export class Mjolnir {
|
||||
];
|
||||
if (config.commands.allowNoPrefix) prefixes.push("!");
|
||||
|
||||
const prefixUsed = prefixes.find(p => content['body'].startsWith(p));
|
||||
const prefixUsed = prefixes.find(p => content['body'].toLowerCase().startsWith(p.toLowerCase()));
|
||||
if (!prefixUsed) return;
|
||||
|
||||
// rewrite the event body to make the prefix uniform (in case the bot has spaces in its display name)
|
||||
|
Loading…
Reference in New Issue
Block a user