mirror of
https://github.com/syuilo/ai.git
synced 2025-03-25 21:12:56 +00:00
#70(他人のリマインダーを操作できる)対応
This commit is contained in:
parent
a6444fa9dc
commit
53c4302d25
1 changed files with 5 additions and 1 deletions
|
@ -115,12 +115,16 @@ export default class extends Module {
|
||||||
|
|
||||||
const done = msg.includes(['done', 'やった', 'やりました', 'はい']);
|
const done = msg.includes(['done', 'やった', 'やりました', 'はい']);
|
||||||
const cancel = msg.includes(['やめる', 'やめた', 'キャンセル']);
|
const cancel = msg.includes(['やめる', 'やめた', 'キャンセル']);
|
||||||
|
const isOneself = msg.userId === remind.userId;
|
||||||
|
|
||||||
if (done || cancel) {
|
if ((done || cancel) && isOneself) {
|
||||||
this.unsubscribeReply(key);
|
this.unsubscribeReply(key);
|
||||||
this.reminds.remove(remind);
|
this.reminds.remove(remind);
|
||||||
msg.reply(done ? getSerif(serifs.reminder.done(msg.friend.name)) : serifs.reminder.cancel);
|
msg.reply(done ? getSerif(serifs.reminder.done(msg.friend.name)) : serifs.reminder.cancel);
|
||||||
return;
|
return;
|
||||||
|
} else if (isOneself === false) {
|
||||||
|
msg.reply("イタズラはめっですよ!");
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (msg.isDm) this.unsubscribeReply(key);
|
if (msg.isDm) this.unsubscribeReply(key);
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue