From 1ee4190fe1dd2863b6a7d0ad94dfc46f38064bbb Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Tue, 4 Feb 2020 18:12:24 -0500 Subject: [PATCH] Fix --- commands/sp-games/mad-libs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/sp-games/mad-libs.js b/commands/sp-games/mad-libs.js index 1a435838..4d1e3ce5 100644 --- a/commands/sp-games/mad-libs.js +++ b/commands/sp-games/mad-libs.js @@ -49,7 +49,9 @@ module.exports = class MadLibsCommand extends Command { } this.client.games.delete(msg.channel.id); let finished = lib.text; - for (let i = 0; i < choices.length; i++) finished = finished.replace(`{${i}}`, `**${choices[i]}**`); + for (let i = 0; i < choices.length; i++) { + finished = finished.replace(new RegExp(`{${i}}`, 'g'), `**${choices[i]}**`); + } return msg.say(finished); } catch (err) { this.client.games.delete(msg.channel.id);