This commit is contained in:
vilP1L
2019-06-19 21:05:22 -04:00

View File

@@ -34,7 +34,8 @@ export default async (client, prize) => {
const json = JSON.parse(data);
wsLog.push(data);
if (json.type === 'question') {
client.hqClients.find(c => c.hasEraser).useEraser();
const botWithEraser = client.hqClients.find(c => c.hasEraser);
if (botWithEraser) botWithEraser.useEraser();
client.weights.hq = [0, 0, 0];
client.userAnswers.hq = [];
({ questionCount, questionNumber } = json);