master
Matthew 2020-08-18 20:39:21 -04:00
parent d3c54ea19e
commit 13e57f5d1e
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 2 additions and 1 deletions

View File

@ -39,11 +39,12 @@ class Thread {
async _formatStaffReplyDM(moderator, text, isAnonymous) { async _formatStaffReplyDM(moderator, text, isAnonymous) {
let req = await axios.get('https://loc.sh/int/directory'); let req = await axios.get('https://loc.sh/int/directory');
req = req.data; req = req.data;
const find = req.find(mem => mem.id === moderator.id);
const mainRole = utils.getMainRole(moderator); const mainRole = utils.getMainRole(moderator);
const modName = (config.useNicknames ? moderator.nick || moderator.user.username : moderator.user.username); const modName = (config.useNicknames ? moderator.nick || moderator.user.username : moderator.user.username);
const modInfo = isAnonymous const modInfo = isAnonymous
? (mainRole ? mainRole.name : 'Staff') ? (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}`; return `**${modInfo}:** ${text}`;
} }