diff --git a/src/commands/mute.ts b/src/commands/mute.ts index a2290f1..600e3f3 100644 --- a/src/commands/mute.ts +++ b/src/commands/mute.ts @@ -55,8 +55,10 @@ export async function runMuteCommand( let user = command[1] || ""; // we default to an empty string because it causes non-fatal errors. let lookup; - let msToUnmute = ms(command[2]); - if(!msToUnmute) { + let msToUnmute; + try { + msToUnmute = ms(command[2]); + } catch { msToUnmute = ms("1d"); reason = command.slice(2).join(" ") || "No reason specified." }