add onRaided event and now ignoring chatters from shared chats

This commit is contained in:
2025-09-09 23:56:53 +02:00
parent 5c2c3fbb53
commit f243677c5c
4 changed files with 23 additions and 4 deletions

View File

@@ -1,10 +1,13 @@
import { redis } from "bun";
import { sendMessage } from "commands";
import { eventSub, streamerId } from "main";
eventSub.onStreamOnline(streamerId, async _msg => {
eventSub.onStreamOnline(streamerId, async msg => {
await redis.set('streamIsLive', '1');
await sendMessage(`${msg.broadcasterDisplayName} IS LIVE! START DIGGING!`);
});
eventSub.onStreamOffline(streamerId, async _msg => {
eventSub.onStreamOffline(streamerId, async msg => {
await redis.del('streamIsLive');
await sendMessage(`${msg.broadcasterDisplayName} IS OFFLINE! NO MORE FREE LOOT!`);
});