From 0dd0b2384968a247c8909ffb492758d23c109d25 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Thu, 4 Apr 2024 10:10:08 -0400 Subject: [PATCH] Use morse time units --- commands/voice/morse.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/commands/voice/morse.js b/commands/voice/morse.js index e49be6b9..1fbcbb1f 100644 --- a/commands/voice/morse.js +++ b/commands/voice/morse.js @@ -46,22 +46,23 @@ module.exports = class MorseCommand extends Command { continue; } const letter = letters[i]; + const timeUnit = 60; if (letter === '.') { connection.play(path.join(__dirname, '..', '..', 'assets', 'sounds', 'morse', 'dot.mp3')); - await delay(500); + await delay(timeUnit * 2); continue; } if (letter === '-') { connection.play(path.join(__dirname, '..', '..', 'assets', 'sounds', 'morse', 'dash.mp3')); - await delay(500); + await delay(timeUnit * 4); continue; } if (letter === ' ' && letters[i + 1] === ' ') { skip = true; - await delay(3500); + await delay(timeUnit * 7); continue; } - await delay(1500); + await delay(timeUnit * 3); } await reactIfAble(msg, msg.author, SUCCESS_EMOJI_ID, '✅'); return null;