pomodoro fix
All checks were successful
release-tag / release-image (push) Successful in 17s

This commit is contained in:
moriese 2025-06-02 10:38:08 +02:00
parent 9914cd2bfb
commit f6bceb215c
2 changed files with 8 additions and 7 deletions

View File

@ -22,7 +22,14 @@ export default class PomodoroController extends EventEmitter {
const leftPomodoroVC = oldState.channelId != null && this.pomodoroChannels.includes(oldState.channelId) &&
newState.channelId !== oldState.channelId;
if (leftPomodoroVC && this.activePomodoros.has(userId)) {
console.log("pomodoro left");
this.pomodoroService.stopPomodoro(userId);
this.activePomodoros.delete(userId);
}
if (joinedPomodoroVC && !this.activePomodoros.has(userId)) {
console.log("pomodoro join");
const member = newState.member;
const vchannel = newState.channel;
if (!member || !vchannel) return;
@ -30,12 +37,6 @@ export default class PomodoroController extends EventEmitter {
this.activePomodoros.add(userId);
this.pomodoroService.startPomodoroLoop(member, vchannel);
}
if (leftPomodoroVC && this.activePomodoros.has(userId)) {
this.pomodoroService.stopPomodoro(userId);
this.activePomodoros.delete(userId);
}
});
}
}

View File

@ -1,6 +1,6 @@
export default {
discord: {
version: 250602.09,
version: 250602.10,
// avocadi
serverID: process.env.DISCORD_SERVER_ID || "",
// texxt channel