From 831cde3cd90659772b9b9e27242a9a22843c472b Mon Sep 17 00:00:00 2001 From: Flummi Date: Sat, 25 Nov 2017 19:45:38 +0100 Subject: [PATCH] replace is crap --- src/inc/trigger/useless_nxy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/inc/trigger/useless_nxy.js b/src/inc/trigger/useless_nxy.js index 81ebaf4..3864659 100644 --- a/src/inc/trigger/useless_nxy.js +++ b/src/inc/trigger/useless_nxy.js @@ -78,8 +78,8 @@ module.exports = bot => { args[0] = (args[0] == String.empty || typeof args[0] === "undefined" || args[0] == "") ? e.user.nick : args[0]; e.replyAction(data.yiff[~~(Math.random() * data.yiff.length)] - .replace("{user}", `[b]${args[0]}[/b]`) - .replace("{yiffer}", `[b]${e.user.nick}[/b]`) + .split("{user}").join(`[b]${args[0]}[/b]`) + .split("{yiffer}").join(`[b]${e.user.nick}[/b]`) ); } });