1 parent 71e86c8 commit dc4d000Copy full SHA for dc4d000
1 file changed
src/components/events/message.ts
@@ -47,6 +47,12 @@ export default async function (msg: Message, type: string) {
47
)
48
return; // ignore them all
49
50
+ // process normalization
51
+ msg.body = msg.body
52
+ .normalize("NFKC")
53
+ .replace(/[\u0300-\u036f\u00b4\u0060\u005e\u007e]/g, "")
54
+ .trim();
55
+
56
/*
57
*
58
* Quiz command validation
@@ -56,12 +62,6 @@ export default async function (msg: Message, type: string) {
62
if (await quiz(msg, quoted)) return;
63
}
64
59
- // process normalization
60
- msg.body = msg.body
61
- .normalize("NFKC")
- .replace(/[\u0300-\u036f\u00b4\u0060\u005e\u007e]/g, "")
- .trim();
-
65
const prefix = !msg.body.startsWith(commandPrefix);
66
const lid = msg.author ? msg.author.split("@")[0] : msg.from.split("@")[0];
67
0 commit comments