From 70fad99e71d3ab6c1d859069c477985f563a8fd7 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Thu, 16 Jul 2020 18:53:50 +0200 Subject: [PATCH] don't respond to m.notices --- index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/index.ts b/index.ts index 4b085d5..52957be 100644 --- a/index.ts +++ b/index.ts @@ -24,6 +24,7 @@ async function handle(roomId, event) { if (event.unsigned.age > 1000 * 60) { console.log("Message was old!"); return; }; if (event.sender === await myself) { console.log("Wait a minute... That's me!"); return;}; + if (event.content.msgtype === "m.notice") { return; }; if (event.content.body === "!xhelp" || event.content.body === (await client.getUserProfile(await myself)).displayname + ": help") {help(roomId); return;}; if (event.content.body === "!xik") {xik(roomId); return;};