うーむ、イベント取得してる最中に一時停止したり不安定なのはなぜだろう...12月以降のだけピックアップしたいので、フィルタリングについて起きたら調べよう...
```
const sub = relay.sub([{ kinds: [1] }]);
sub.on("event", (ev) => {
console.log("Event received:", ev);
try {
if (ev.created_at >= december2023Timestamp){
if (ev.content.includes(targetWord)) {
console.log(`Target word '${targetWord}' found in event.`);
const reaction = composeReaction(ev);
console.log("Composed reaction:", reaction);
publishToRelay(relay, reaction);
}
}
} catch (err) {
console.error(err);
}
});
};
```