This commit is contained in:
parent
9914cd2bfb
commit
f6bceb215c
@ -22,7 +22,14 @@ export default class PomodoroController extends EventEmitter {
|
|||||||
const leftPomodoroVC = oldState.channelId != null && this.pomodoroChannels.includes(oldState.channelId) &&
|
const leftPomodoroVC = oldState.channelId != null && this.pomodoroChannels.includes(oldState.channelId) &&
|
||||||
newState.channelId !== 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)) {
|
if (joinedPomodoroVC && !this.activePomodoros.has(userId)) {
|
||||||
|
console.log("pomodoro join");
|
||||||
const member = newState.member;
|
const member = newState.member;
|
||||||
const vchannel = newState.channel;
|
const vchannel = newState.channel;
|
||||||
if (!member || !vchannel) return;
|
if (!member || !vchannel) return;
|
||||||
@ -30,12 +37,6 @@ export default class PomodoroController extends EventEmitter {
|
|||||||
this.activePomodoros.add(userId);
|
this.activePomodoros.add(userId);
|
||||||
this.pomodoroService.startPomodoroLoop(member, vchannel);
|
this.pomodoroService.startPomodoroLoop(member, vchannel);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (leftPomodoroVC && this.activePomodoros.has(userId)) {
|
|
||||||
this.pomodoroService.stopPomodoro(userId);
|
|
||||||
this.activePomodoros.delete(userId);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
export default {
|
export default {
|
||||||
discord: {
|
discord: {
|
||||||
version: 250602.09,
|
version: 250602.10,
|
||||||
// avocadi
|
// avocadi
|
||||||
serverID: process.env.DISCORD_SERVER_ID || "",
|
serverID: process.env.DISCORD_SERVER_ID || "",
|
||||||
// texxt channel
|
// texxt channel
|
||||||
|
Loading…
x
Reference in New Issue
Block a user