This commit is contained in:
Dragon Fire
2020-10-31 11:11:48 -04:00
parent 0528178e9d
commit 0e92006cb6
2 changed files with 52 additions and 16 deletions
+2 -2
View File
@@ -36,13 +36,13 @@ module.exports = class HearingTestCommand extends Command {
}
try {
let age;
for (const [dataAge, file] of Object.entries(data)) {
for (const { age: dataAge, file } of data) {
connection.play(path.join(__dirname, '..', '..', 'assets', 'sounds', 'hearing-test', file));
await delay(2000);
await msg.reply('Did you hear that sound? Reply with [y]es or [n]o.');
const heard = await verify(msg.channel, msg.author);
if (!heard) {
age = dataAge.replace(/a|b|c|d/, '');
age = dataAge;
break;
}
}