mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Fix
This commit is contained in:
@@ -49,7 +49,9 @@ module.exports = class MadLibsCommand extends Command {
|
|||||||
}
|
}
|
||||||
this.client.games.delete(msg.channel.id);
|
this.client.games.delete(msg.channel.id);
|
||||||
let finished = lib.text;
|
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);
|
return msg.say(finished);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.client.games.delete(msg.channel.id);
|
this.client.games.delete(msg.channel.id);
|
||||||
|
|||||||
Reference in New Issue
Block a user