Compare commits

...

3 Commits
main ... based

Author SHA1 Message Date
array-in-a-matrix b9504cc6a1 Update 'index.js' 2023-01-30 13:23:39 -05:00
array-in-a-matrix 9662133052 based 2023-01-30 12:22:38 -05:00
array-in-a-matrix 47f3a708b7 based 2023-01-30 12:21:54 -05:00
2 changed files with 6 additions and 6 deletions

View File

@ -1,3 +1,3 @@
# real
# based
real
based

View File

@ -5,13 +5,13 @@ const storage = new SimpleFsStorageProvider("storage.json");
const client = new MatrixClient(config.homeserver, config.token, storage);
AutojoinRoomsMixin.setupOnClient(client);
client.start().then(() => console.log(`real`));
client.start().then(() => console.log(`based`));
client.on("room.message", (roomId, event) => {
if (!event["content"] || event["sender"] === config.user) return;
if (!event["content"] || event["sender"].includes("_bot:")) return;
try {
if (event["content"]["body"].toLowerCase().includes("real")) {
client.replyText(roomId, event, "real")
if (event["content"]["body"].toLowerCase().includes("base")) {
client.replyText(roomId, event, "based on what?")
console.table([roomId, event["sender"], event["content"]["body"]])
}
} catch (error) {