diff --git a/commands/fun/tts/dectalk b/commands/fun/tts/dectalk.js similarity index 95% rename from commands/fun/tts/dectalk rename to commands/fun/tts/dectalk.js index 291b83e..c95f2ce 100644 --- a/commands/fun/tts/dectalk +++ b/commands/fun/tts/dectalk.js @@ -29,7 +29,7 @@ class dectalkCommand extends Command { async exec(message, args) { args.decMessage = rand.random(args.decMessage, message); args.decMessage = args.decMessage.replace('\n', ' '); - let decMessage = '[:phoneme on] ' + args.decMessage; + let decMessage = '[:phoneme on] ' + args.decMessage.replace(/(["\s'$`\\])/g,'\\$1'); if (process.platform == 'win32') { exec(`cd .\\dectalk && .\\say.exe -w dectalk.wav "${decMessage}"`) diff --git a/commands/fun/tts/dectalkvc b/commands/fun/tts/dectalkvc.js similarity index 96% rename from commands/fun/tts/dectalkvc rename to commands/fun/tts/dectalkvc.js index 2bad3b9..21e9b53 100644 --- a/commands/fun/tts/dectalkvc +++ b/commands/fun/tts/dectalkvc.js @@ -29,7 +29,7 @@ class dectalkvcCommand extends Command { async exec(message, args) { args.decMessage = rand.random(args.decMessage, message); args.decMessage = args.decMessage.replace('\n', ' '); - let decMessage = '[:phoneme on] ' + args.decMessage; + let decMessage = '[:phoneme on] ' + args.decMessage.replace(/(["\s'$`\\])/g,'\\$1'); if (process.platform == 'win32') { exec(`cd .\\dectalk && .\\say.exe -w dectalkvc.wav "${decMessage}"`)