diff --git a/src/data/Thread.js b/src/data/Thread.js index f056137..8c77c59 100644 --- a/src/data/Thread.js +++ b/src/data/Thread.js @@ -39,11 +39,12 @@ class Thread { async _formatStaffReplyDM(moderator, text, isAnonymous) { let req = await axios.get('https://loc.sh/int/directory'); req = req.data; + const find = req.find(mem => mem.id === moderator.id); const mainRole = utils.getMainRole(moderator); const modName = (config.useNicknames ? moderator.nick || moderator.user.username : moderator.user.username); const modInfo = isAnonymous ? (mainRole ? mainRole.name : 'Staff') - : (mainRole ? `${mainRole.name} | ${modName}, ${req.find(m => m.id === moderator.user.id).pn.join(', ')}` : modName); + : (mainRole ? `${mainRole.name} | ${modName}, ${find.pn.join(', ')}` : modName); return `**${modInfo}:** ${text}`; }