meow
meow
This commit is contained in:
parent
c987b538e8
commit
4df2500be6
6
index.js
6
index.js
|
@ -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(`meow`));
|
||||
|
||||
client.on("room.message", (roomId, event) => {
|
||||
if (!event["content"] || event["sender"] === config.user) return;
|
||||
try {
|
||||
if (event["content"]["body"].toLowerCase().includes("real")) {
|
||||
client.replyText(roomId, event, "real")
|
||||
if (event["content"]["body"].toLowerCase().includes("meow")) {
|
||||
client.replyText(roomId, event, "meow")
|
||||
console.table([roomId, event["sender"], event["content"]["body"]])
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
Loading…
Reference in a new issue