Fix2
parent
087fd85447
commit
1f235bb806
|
@ -126,16 +126,16 @@ Here's what their message contained:
|
||||||
const memberPromise = (mainGuild ? mainGuild.getRESTMember(msg.author.id) : Promise.resolve());
|
const memberPromise = (mainGuild ? mainGuild.getRESTMember(msg.author.id) : Promise.resolve());
|
||||||
|
|
||||||
threadInitDonePromise = memberPromise
|
threadInitDonePromise = memberPromise
|
||||||
|
.catch(err => {
|
||||||
|
console.log(`Member ${msg.author.id} not found in main guild ${config.mainGuildId}`);
|
||||||
|
console.error(err);
|
||||||
|
})
|
||||||
.then(member => {
|
.then(member => {
|
||||||
const mainGuildNickname = (member != null ? (member.nick || member.username) : 'UNKNOWN');
|
const mainGuildNickname = (member != null ? (member.nick || member.username) : 'UNKNOWN');
|
||||||
const accountAge = humanizeDuration(Date.now() - msg.author.createdAt, {largest: 2});
|
const accountAge = humanizeDuration(Date.now() - msg.author.createdAt, {largest: 2});
|
||||||
const infoHeader = `ACCOUNT AGE **${accountAge}**, ID **${msg.author.id}**, NICKNAME **${mainGuildNickname}**, LOGS **${userLogs.length}**\n-------------------------------`;
|
const infoHeader = `ACCOUNT AGE **${accountAge}**, ID **${msg.author.id}**, NICKNAME **${mainGuildNickname}**, LOGS **${userLogs.length}**\n-------------------------------`;
|
||||||
|
|
||||||
bot.createMessage(thread.channelId, infoHeader);
|
bot.createMessage(thread.channelId, infoHeader);
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
console.log(`Member ${msg.author.id} not found in main guild ${config.mainGuildId}`);
|
|
||||||
console.error(err);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Ping mods of the new thread
|
// Ping mods of the new thread
|
||||||
|
|
Loading…
Reference in New Issue