From 2fd129acc26d552524ff797bed76739684262b8d Mon Sep 17 00:00:00 2001 From: Xetera Date: Sun, 28 Jul 2019 23:19:49 -0700 Subject: [PATCH] fixed error with buildHelper --- scripts/buildHelpers.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/buildHelpers.js b/scripts/buildHelpers.js index ccb75eb..6f86bfd 100644 --- a/scripts/buildHelpers.js +++ b/scripts/buildHelpers.js @@ -11,16 +11,14 @@ module.exports = { const hash = identifier.slice(hashLocation + 1) return [name, hash] }, - getDefaultAvatar(name) { - const [_, hash] = this.splitHash(hashLocation) - - const avatar = Number(hash) % DEFAULT_AVATAR_MODULO + getDefaultAvatar(hash) { + const avatar = hash % DEFAULT_AVATAR_MODULO return `https://cdn.discordapp.com/embed/avatars/${avatar}.png` }, resolveAuthor(users, author) { const target = users.find(user => user.identifier === author) const [name, hash] = this.splitHash(author) - const avatar = target ? target.avatar : this.getDefaultAvatar(author) + const avatar = target ? target.avatar : this.getDefaultAvatar(hash) return { name,