mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-12 08:14:47 +02:00
Fix
This commit is contained in:
@@ -1,14 +1,50 @@
|
|||||||
{
|
[
|
||||||
"all": "8000.mp3",
|
{
|
||||||
"60": "10000.mp3",
|
"age": "all",
|
||||||
"50": "12000.mp3",
|
"file": "8000.mp3"
|
||||||
"45": "14000.mp3",
|
},
|
||||||
"39": "15000.mp3",
|
{
|
||||||
"30": "16000.mp3",
|
"age": "60",
|
||||||
"24a": "17000.mp3",
|
"file": "10000.mp3"
|
||||||
"24b": "18000.mp3",
|
},
|
||||||
"24c": "19000.mp3",
|
{
|
||||||
"24d": "20000.mp3",
|
"age": "50",
|
||||||
"20": "21000.mp3",
|
"file": "12000.mp3"
|
||||||
"18": "22000.mp3"
|
},
|
||||||
}
|
{
|
||||||
|
"age": "45",
|
||||||
|
"file": "14000.mp3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"age": "39",
|
||||||
|
"file": "15000.mp3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"age": "30",
|
||||||
|
"file": "16000.mp3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"age": "24",
|
||||||
|
"file": "17000.mp3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"age": "24",
|
||||||
|
"file": "18000.mp3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"age": "24",
|
||||||
|
"file": "19000.mp3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"age": "24",
|
||||||
|
"file": "20000.mp3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"age": "20",
|
||||||
|
"file": "21000.mp3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"age": "18",
|
||||||
|
"file": "22000.mp3"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|||||||
@@ -36,13 +36,13 @@ module.exports = class HearingTestCommand extends Command {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let age;
|
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));
|
connection.play(path.join(__dirname, '..', '..', 'assets', 'sounds', 'hearing-test', file));
|
||||||
await delay(2000);
|
await delay(2000);
|
||||||
await msg.reply('Did you hear that sound? Reply with [y]es or [n]o.');
|
await msg.reply('Did you hear that sound? Reply with [y]es or [n]o.');
|
||||||
const heard = await verify(msg.channel, msg.author);
|
const heard = await verify(msg.channel, msg.author);
|
||||||
if (!heard) {
|
if (!heard) {
|
||||||
age = dataAge.replace(/a|b|c|d/, '');
|
age = dataAge;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user