mirror of
https://github.com/syuilo/ai.git
synced 2025-03-25 21:12:56 +00:00
commit
ab30e4f7f7
1 changed files with 11 additions and 3 deletions
|
@ -59,9 +59,12 @@ export default class extends Module {
|
||||||
const separatorIndex = text.indexOf(' ') > -1 ? text.indexOf(' ') : text.indexOf('\n');
|
const separatorIndex = text.indexOf(' ') > -1 ? text.indexOf(' ') : text.indexOf('\n');
|
||||||
const thing = text.substr(separatorIndex + 1).trim();
|
const thing = text.substr(separatorIndex + 1).trim();
|
||||||
|
|
||||||
if (thing === '' && msg.quoteId == null) {
|
if (thing === '' && msg.quoteId == null || msg.visibility === 'followers') {
|
||||||
msg.reply(serifs.reminder.invalid);
|
msg.reply(serifs.reminder.invalid);
|
||||||
return true;
|
return {
|
||||||
|
reaction: '🆖',
|
||||||
|
immediate: true,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.visibility === 'followers') {
|
if (msg.visibility === 'followers') {
|
||||||
|
@ -157,7 +160,12 @@ export default class extends Module {
|
||||||
text: acct(friend.doc.user) + ' ' + serifs.reminder.notify(friend.name)
|
text: acct(friend.doc.user) + ' ' + serifs.reminder.notify(friend.name)
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// TODO: renote対象が消されていたらリマインダー解除
|
// renote対象が消されていたらリマインダー解除
|
||||||
|
if (err.statusCode === 400 && err.error.error.message === 'No such renote target.') {
|
||||||
|
this.unsubscribeReply(remind.thing == null && remind.quoteId ? remind.quoteId : remind.id);
|
||||||
|
this.reminds.remove(remind);
|
||||||
|
return;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue