From f46d719f4cd8f0d095104fecd30895760890fa27 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Wed, 23 Sep 2020 00:21:44 +0300 Subject: [PATCH] Code clean-up --- src/data/threads.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/data/threads.js b/src/data/threads.js index dbc6142..9ed03a8 100644 --- a/src/data/threads.js +++ b/src/data/threads.js @@ -136,14 +136,12 @@ async function createNewThreadForUser(user, opts = {}) { if (cleanName === "") cleanName = "unknown"; cleanName = cleanName.slice(0, 95); // Make sure the discrim fits - let temporalName = `${cleanName}-${user.discriminator}`; + let channelName = `${cleanName}-${user.discriminator}`; if (config.anonymizeChannelName) { - temporalName = crypto.createHash("md5").update(temporalName + new Date()).digest("hex").slice(0, 12); + channelName = crypto.createHash("md5").update(channelName + Date.now()).digest("hex").slice(0, 12); } - const channelName = temporalName; - console.log(`[NOTE] Creating new thread channel ${channelName}`); // Figure out which category we should place the thread channel in