diff --git a/commands/profile.js b/commands/profile.js index 0baa32d..5b04379 100644 --- a/commands/profile.js +++ b/commands/profile.js @@ -17,7 +17,7 @@ module.exports = { let profile = await user.getProfile(); let profileTemplate = fs.readFileSync('/app/assets/profile/profile.svg').toString(); - profileTemplate = profileTemplate.replace(/{{USERNAME}}/g, interaction.member.user.username); + profileTemplate = profileTemplate.replace(/{{USERNAME}}/g, interaction.member.displayName.substr(0,15)+(interaction.member.displayName.length>15?'...':'')); profileTemplate = profileTemplate.replace(/{{HEADER_COLOR}}/g, '190,31,97'); let slots = ['slotOne', 'slotTwo', 'slotThree', 'slotFour']; diff --git a/util/compositing.js b/util/compositing.js index d929157..43d57b4 100644 --- a/util/compositing.js +++ b/util/compositing.js @@ -7,7 +7,7 @@ const { Card } = require('../models'); module.exports = { name: "Compositing", renderProfile: async function(profile, svgTemplate, renderedCards) { - let hash = crypto.createHash('md5').update(JSON.stringify(profile)).digest('hex'); + let hash = crypto.createHash('md5').update(JSON.stringify(profile) + svgTemplate).digest('hex'); let outFile = `/app/assets/image_cache/profiles/${hash}.gif`; console.log('Rendering profile to ' + outFile);