数秒待つように

This commit is contained in:
syuilo 2018-08-04 18:54:43 +09:00
parent 8817ef3685
commit f98644978e

View file

@ -38,16 +38,18 @@ homeStream.addEventListener('message', message => {
if (note.userId == config.id) return; if (note.userId == config.id) return;
// リアクションする // リアクションする
request.post(`${apiUrl}/notes/reactions/create`, { setTimeout(() => {
json: { request.post(`${apiUrl}/notes/reactions/create`, {
i: config.i, json: {
noteId: note.id, i: config.i,
reaction: 'love' noteId: note.id,
} reaction: 'love'
}); }
});
}, 2000);
if (note.text) { if (note.text && note.text.indexOf('リバーシ') > -1) {
if (note.text.indexOf('リバーシ') > -1) { setTimeout(() => {
request.post(`${apiUrl}/notes/create`, { request.post(`${apiUrl}/notes/create`, {
json: { json: {
i: config.i, i: config.i,
@ -57,7 +59,7 @@ homeStream.addEventListener('message', message => {
}); });
invite(note.userId); invite(note.userId);
} }, 3000);
} }
} }