Compare commits
5 Commits
bc2c7f0581
...
696c06dc29
Author | SHA1 | Date |
---|---|---|
|
696c06dc29 | |
|
45d8338b5a | |
|
e2f257b4b1 | |
|
21e594409d | |
|
5cd9e171da |
|
@ -34,6 +34,10 @@ export default class Message {
|
|||
return this.messageOrNote.renoteId;
|
||||
}
|
||||
|
||||
public get visibility(): string {
|
||||
return this.messageOrNote.visibility;
|
||||
}
|
||||
|
||||
/**
|
||||
* メンション部分を除いたテキスト本文
|
||||
*/
|
||||
|
|
|
@ -59,9 +59,12 @@ export default class extends Module {
|
|||
const separatorIndex = text.indexOf(' ') > -1 ? text.indexOf(' ') : text.indexOf('\n');
|
||||
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);
|
||||
return true;
|
||||
return {
|
||||
reaction: '🆖',
|
||||
immediate: true,
|
||||
};
|
||||
}
|
||||
|
||||
const remind = this.reminds.insertOne({
|
||||
|
@ -112,12 +115,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(serifs.reminder.doneFromInvalidUser);
|
||||
return;
|
||||
} else {
|
||||
if (msg.isDm) this.unsubscribeReply(key);
|
||||
return false;
|
||||
|
@ -149,7 +156,12 @@ export default class extends Module {
|
|||
text: acct(friend.doc.user) + ' ' + serifs.reminder.notify(friend.name)
|
||||
});
|
||||
} catch (err) {
|
||||
// TODO: renote対象が消されていたらリマインダー解除
|
||||
// renote対象が消されていたらリマインダー解除
|
||||
if (err.statusCode === 400) {
|
||||
this.unsubscribeReply(remind.thing == null && remind.quoteId ? remind.quoteId : remind.id);
|
||||
this.reminds.remove(remind);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -339,6 +339,8 @@ export default {
|
|||
reminder: {
|
||||
invalid: 'うーん...?',
|
||||
|
||||
doneFromInvalidUser: 'イタズラはめっですよ!',
|
||||
|
||||
reminds: 'やること一覧です!',
|
||||
|
||||
notify: (name) => name ? `${name}、これやりましたか?` : `これやりましたか?`,
|
||||
|
|
|
@ -32,7 +32,7 @@ export const itemPrefixes = [
|
|||
'折り畳み式',
|
||||
'携帯型',
|
||||
'遺伝子組み換え',
|
||||
'突然変異して飛行能力を獲得した',
|
||||
'飛行能力を獲得した',
|
||||
'純金製',
|
||||
'透明な',
|
||||
'光る',
|
||||
|
@ -119,36 +119,26 @@ export const itemPrefixes = [
|
|||
'巨大',
|
||||
'ナノサイズ',
|
||||
'やわらかい',
|
||||
'人の手に負えない',
|
||||
'バグった',
|
||||
'どこからともなく現れる',
|
||||
'人工',
|
||||
'天然',
|
||||
'祀られた',
|
||||
'チョコレートコーティング',
|
||||
'地域で親しまれている',
|
||||
'抗菌仕様',
|
||||
'耐火',
|
||||
'血行を良くする作用がある',
|
||||
'なんらかのオーラを感じる',
|
||||
'周囲の気温を上昇させる効果がある',
|
||||
'激',
|
||||
'猛',
|
||||
'超',
|
||||
'群生する',
|
||||
'軽量',
|
||||
'国宝級',
|
||||
'称賛に値する',
|
||||
'世界に通用する',
|
||||
'一世を風靡した',
|
||||
'流行りの',
|
||||
'8カラットの',
|
||||
'中古の',
|
||||
'新品の',
|
||||
'愛妻',
|
||||
'ブランドものの',
|
||||
'忘らるる',
|
||||
'指数関数的勢いで増殖する',
|
||||
'増殖する',
|
||||
'ぷるぷる',
|
||||
'ぐにゃぐにゃ',
|
||||
'多目的',
|
||||
|
@ -157,46 +147,28 @@ export const itemPrefixes = [
|
|||
'先進的な',
|
||||
'レトロな',
|
||||
'ヴィンテージ',
|
||||
'100日後に何らかが起きる',
|
||||
'合法',
|
||||
'プレミア付き',
|
||||
'デカ',
|
||||
'ギガ',
|
||||
'穢れた',
|
||||
'加護を受けた',
|
||||
'品質保証付き',
|
||||
'AppleCare+加入済み',
|
||||
'えっちな',
|
||||
'純粋な',
|
||||
'構造上の欠陥がある',
|
||||
'デザイナーズ',
|
||||
'蠱惑的な',
|
||||
'概念としての',
|
||||
'霊験灼かな',
|
||||
'御利益がありそうな',
|
||||
'つやつや',
|
||||
'べとべと',
|
||||
'ムキムキの',
|
||||
'ムキムキ',
|
||||
'オーバークロックされた',
|
||||
'リミッター解除された',
|
||||
'無機質な',
|
||||
'前衛的な',
|
||||
'会社から支給された',
|
||||
'担保としての',
|
||||
'経費で落ちる',
|
||||
'真贋が定かでない',
|
||||
'肥えた',
|
||||
'怪しい',
|
||||
'妖しい',
|
||||
'攻撃的な',
|
||||
'現存する最古の',
|
||||
'考古学的価値がある',
|
||||
'官能的な',
|
||||
'備え付けの',
|
||||
'カビの生えた',
|
||||
'丹念に熟成された',
|
||||
'熟成',
|
||||
'アルミダイキャスト',
|
||||
'畏怖の念を抱く',
|
||||
'養殖',
|
||||
'やばい',
|
||||
'すごい',
|
||||
|
@ -204,8 +176,6 @@ export const itemPrefixes = [
|
|||
'デジタル',
|
||||
'アナログ',
|
||||
'彁な',
|
||||
'キミの',
|
||||
'あなただけの',
|
||||
'カラフルな',
|
||||
'電動',
|
||||
'当たり判定のない',
|
||||
|
@ -221,7 +191,6 @@ export const itemPrefixes = [
|
|||
'滅びの',
|
||||
'反発係数がe>1の',
|
||||
'摩擦係数0の',
|
||||
'誉れ高き',
|
||||
'解き放たれし',
|
||||
'大きな',
|
||||
'小さな',
|
||||
|
@ -229,6 +198,8 @@ export const itemPrefixes = [
|
|||
'うねうね',
|
||||
'水没',
|
||||
'燃え盛る',
|
||||
'高圧',
|
||||
'異常',
|
||||
];
|
||||
|
||||
export const items = [
|
||||
|
@ -471,19 +442,18 @@ export const items = [
|
|||
'メビウスの輪',
|
||||
'オリハルコン',
|
||||
'ヘドロ',
|
||||
'グレーチング',
|
||||
'繝九Λ縺ョ縺ソ縺晄ア',
|
||||
];
|
||||
|
||||
export const and = [
|
||||
'に擬態した',
|
||||
'入りの',
|
||||
'が埋め込まれた',
|
||||
'を連想させる',
|
||||
'っぽい',
|
||||
'に見せかけて',
|
||||
'を虐げる',
|
||||
'を侍らせた',
|
||||
'が上に乗った',
|
||||
'のそばにある',
|
||||
];
|
||||
|
||||
export function genItem(seedOrRng?: (() => number) | string | number) {
|
||||
|
|
Loading…
Reference in New Issue