From b6a671fe511552f618d7b1de1e8aaa372c41db25 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 24 Jan 2019 20:49:27 +0900 Subject: [PATCH] Resolve #6 --- src/ai.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ai.ts b/src/ai.ts index 42e85b6..618c962 100644 --- a/src/ai.ts +++ b/src/ai.ts @@ -116,6 +116,18 @@ export default class 藍 { this.onReceiveMessage(new Message(this, data, false)); }); + // Renoteされたとき + mainStream.on('renote', async data => { + if (data.userId == this.account.id) return; // 自分は弾く + if (data.text == null && (data.files || []).length == 0) return; + + // リアクションする + this.api('notes/reactions/create', { + noteId: data.id, + reaction: 'love' + }); + }); + // メッセージ mainStream.on('messagingMessage', data => { if (data.userId == this.account.id) return; // 自分は弾く