mirror of
https://github.com/the-draupnir-project/Draupnir.git
synced 2026-05-10 17:55:18 +00:00
Make !mjolnir not case sensitive
This commit is contained in:
+3
-1
@@ -84,7 +84,9 @@ export class Mjolnir {
|
||||
];
|
||||
if (config.commands.allowNoPrefix) prefixes.push("!");
|
||||
|
||||
const prefixUsed = prefixes.find(p => content['body'].startsWith(p));
|
||||
console.log(content['body'])
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user