mirror of
https://github.com/syuilo/ai.git
synced 2024-11-22 05:08:00 +00:00
Resolve #6
This commit is contained in:
parent
51ae9d171c
commit
b6a671fe51
12
src/ai.ts
12
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; // 自分は弾く
|
||||
|
|
Loading…
Reference in a new issue