From 4ec8fc78572813e0bc85eded57a33829c8bea931 Mon Sep 17 00:00:00 2001 From: na2na <49822810+na2na-p@users.noreply.github.com> Date: Thu, 14 Apr 2022 22:01:08 +0900 Subject: [PATCH] =?UTF-8?q?#70(=E4=BB=96=E4=BA=BA=E3=81=AE=E3=83=AA?= =?UTF-8?q?=E3=83=9E=E3=82=A4=E3=83=B3=E3=83=80=E3=83=BC=E3=82=92=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E3=81=A7=E3=81=8D=E3=82=8B)=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/reminder/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/reminder/index.ts b/src/modules/reminder/index.ts index 9b53f36..29e2ead 100644 --- a/src/modules/reminder/index.ts +++ b/src/modules/reminder/index.ts @@ -123,12 +123,16 @@ export default class extends Module { const done = msg.includes(['done', 'やった', 'やりました', 'はい']); const cancel = msg.includes(['やめる', 'やめた', 'キャンセル']); + const isOneself = msg.userId === remind.userId; - if (done || cancel) { + if ((done || cancel) && isOneself) { this.unsubscribeReply(key); this.reminds.remove(remind); msg.reply(done ? getSerif(serifs.reminder.done(msg.friend.name)) : serifs.reminder.cancel); return; + } else if (isOneself === false) { + msg.reply("イタズラはめっですよ!"); + return; } else { if (msg.isDm) this.unsubscribeReply(key); return false;