don't respond to m.notices

This commit is contained in:
Daniel Olsen 2020-07-16 18:53:50 +02:00
parent 268f73a9ce
commit 70fad99e71
1 changed files with 1 additions and 0 deletions

View File

@ -24,6 +24,7 @@ async function handle(roomId, event) {
if (event.unsigned.age > 1000 * 60) { console.log("Message was old!"); return; }; 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.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 === "!xhelp" || event.content.body === (await client.getUserProfile(await myself)).displayname + ": help") {help(roomId); return;};
if (event.content.body === "!xik") {xik(roomId); return;}; if (event.content.body === "!xik") {xik(roomId); return;};