summaryrefslogtreecommitdiff
path: root/matrix.js
diff options
context:
space:
mode:
Diffstat (limited to 'matrix.js')
-rw-r--r--matrix.js126
1 files changed, 0 insertions, 126 deletions
diff --git a/matrix.js b/matrix.js
index 3103a7a..8c63b79 100644
--- a/matrix.js
+++ b/matrix.js
@@ -78,132 +78,6 @@ function startMatrix() {
}
} else if (message.includes(require('./credentials.json').username) || (event.event.content.formatted_body && event.event.content.formatted_body.includes(require('./credentials.json').username))) {
matrixSend(room.roomId, "👋 Hello! I think you forgot my prefix is `.`, use `.help` to get help.");
- } else {
- if (!lastMessages[room.roomId]) lastMessages[room.roomId] = [];
- lastMessages[room.roomId].unshift(event.event.content.body);
- lastMessages[room.roomId] = lastMessages[room.roomId].splice(0, 5);
-
- let text = event.event.content.body.toLowerCase();
-
- if (event.event.sender === "@cloudburst:equestria.dev" || event.event.sender === "@raindrops:equestria.dev" || event.event.sender === "@stargrove:equestria.dev") {
- let worth = 1 / (score['score'] / 100);
- if (worth < 0.1) worth = 0.1;
- if (worth > 100) worth = 100;
-
- if (score['score'] === 0) {
- score['score'] = 0.01;
- }
-
- if (text.includes("....")) {
- score['score'] -= text.replace(/[^.]/gm, "").length * worth;
- }
-
- if (text.replace(/[^.]/gm, "").length === text.length) {
- score['score'] -= text.replace(/[^.]/gm, "").length * 5 * worth;
- }
-
- if (text.includes(".c.")) {
- score['score'] += 5 * worth;
- }
-
- if (text.includes("neigh")) {
- score['score'] += 5 * worth;
- }
-
- if (text.includes("-c-")) {
- score['score'] += 5 * worth;
- }
-
- if (text.includes("bye")) {
- score['score'] -= 50 * worth;
- }
-
- if (text.endsWith(".") && !text.endsWith("..") && !text.endsWith("...") && !text.endsWith(".c.")) {
- score['score'] -= 10 * worth;
- }
-
- if (text.match(/^\*(.*)\*$/gm)) {
- score['score'] += 2 * worth;
- }
-
- if (text.includes("❤")) {
- score['score'] += text.replace(/[^❤]/gm, "").length * 3 * worth;
- }
-
- if (text.includes("hehe")) {
- score['score'] += 2 * worth;
- }
-
- if (text.includes("pff")) {
- score['score'] += 2 * worth;
- }
-
- if (text.includes("mhm!")) {
- score['score'] += 1 * worth;
- }
-
- if (text.includes("cutie")) {
- score['score'] += 5 * worth;
- }
-
- if (text.includes("silly")) {
- score['score'] += 5 * worth;
- }
-
- if (text.includes("sweetie")) {
- score['score'] += 2 * worth;
- }
-
- if (text.includes("sis")) {
- score['score'] += 2 * worth;
- }
-
- if (text.includes("nini")) {
- score['score'] += 2 * worth;
- }
-
- if (text.includes("good night")) {
- score['score'] += 2 * worth;
- }
-
- if (text.includes("hehehehe")) {
- score['score'] += 4 * worth;
- }
-
- if (text.includes("hehehe")) {
- score['score'] += 3 * worth;
- }
-
- if (text.includes("woo!")) {
- score['score'] += 3 * worth;
- }
-
- if (text.includes("yay!")) {
- score['score'] += 3 * worth;
- }
-
- if (text.includes("/s")) {
- score['score'] += 3 * worth;
- }
-
- if (text.includes("love you")) {
- score['score'] += 5 * worth;
- }
-
- if (text.includes("love u")) {
- score['score'] += 5 * worth;
- }
-
- if (text.includes("^c^")) {
- score['score'] += 3 * worth;
- }
-
- if (Math.floor(score['percentage']) < Math.floor(score['score'] / 12.5)) {
- matrixSend(room.roomId, "🎉 Congrats! Your love score is now at " + Math.floor(score['score'] / 12.5) + "%, keep it up!");
- }
-
- score['percentage'] = score['score'] / 12.5;
- }
}
}
});