Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let startSwitching = (room) => {
- if (!window.switchingRooms) window.switchingRooms = {};
- let increment = 2;
- window.switchingRooms[room] = setInterval(() => {
- app.send(`/choose switch ${increment}`, room);
- increment++;
- if (increment > 6) increment = 2;
- }, 1000);
- };
- let stopSwitching = (room) => {
- let switchingRoom = window.switchingRooms[room];
- if (switchingRoom) clearInterval(switchingRoom);
- };
Advertisement
Add Comment
Please, Sign In to add comment