jank fixes

This commit is contained in:
2025-09-11 14:44:26 +02:00
parent 7af09370da
commit 3e373056c9
8 changed files with 38 additions and 11 deletions

View File

@@ -30,9 +30,11 @@ async function parseChatMessage(msg: EventSubChannelChatMessageEvent) {
if (!await isInvuln(user?.id!)) user?.setVulnerable(); // Make the user vulnerable to explosions if not marked as invuln
if (!await redis.exists(`user:${user?.id}:haschatted`) && !msg.sourceMessageId) {
await sendMessage(`Welcome ${user?.displayName}. Please note: This chat has PvP, if you get timed out that's part of the qwerinope experience. You have 10 minutes of invincibility. A full list of commands and items can be found here: https://github.com/qwerinope/qweribot/#qweribot`);
const message = await sendMessage(`Welcome ${user?.displayName}. Please note: This chat has PvP, if you get timed out that's part of the qwerinope experience. You have 10 minutes of invincibility. A full list of commands and items can be found here: https://github.com/qwerinope/qweribot/#qweribot`);
await redis.set(`user:${user?.id}:haschatted`, "1");
if (!streamerUsers.includes(msg.chatterId)) await setTemporaryInvuln(user?.id!); // This would set the invuln expiration lmao
await redis.set(`user:${user?.id}:welcomemessageid`, message.id);
await redis.expire(`user:${user?.id}:welcomemessageid`, 600);
if (!await isInvuln(msg.chatterId)) await setTemporaryInvuln(user?.id!); // This would set the invuln expiration lmao
};
if (!msg.isCheer && !msg.isRedemption) await handleChatMessage(msg, user!)
@@ -57,6 +59,9 @@ async function handleChatMessage(msg: EventSubChannelChatMessageEvent, user: Use
case "streamer":
if (!streamerUsers.includes(msg.chatterId)) return;
break;
case "moderator":
if (!await redis.exists(`user:${user.id}:mod`)) return;
break;
};
try { await selected.execute(msg, user); }