Code clean-up

cshd
Dragory 2020-09-23 00:21:44 +03:00
parent e2de5b97bd
commit f46d719f4c
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
1 changed files with 2 additions and 4 deletions

View File

@ -136,14 +136,12 @@ async function createNewThreadForUser(user, opts = {}) {
if (cleanName === "") cleanName = "unknown"; if (cleanName === "") cleanName = "unknown";
cleanName = cleanName.slice(0, 95); // Make sure the discrim fits cleanName = cleanName.slice(0, 95); // Make sure the discrim fits
let temporalName = `${cleanName}-${user.discriminator}`; let channelName = `${cleanName}-${user.discriminator}`;
if (config.anonymizeChannelName) { 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}`); console.log(`[NOTE] Creating new thread channel ${channelName}`);
// Figure out which category we should place the thread channel in // Figure out which category we should place the thread channel in