more descriptive banland message & async ping
This commit is contained in:
parent
1716e4bf1b
commit
5707493cfb
@ -141,8 +141,11 @@ class ChannelHandler {
|
||||
footer: { text: `• User ID: ${user.id}` },
|
||||
color: guild.me.highestRoleColor
|
||||
};
|
||||
if (member && member.banned) embed.description = `**__USER IS IN BANLAND__**`;
|
||||
else if (member) embed.fields.push({
|
||||
if (member && member.inAppealServer) {
|
||||
const ban = await guild.fetchBan(member.id).catch(() => null);
|
||||
if (ban) embed.description = `**__USER IS BANNED FROM MAIN SERVER__**`;
|
||||
else embed.description = `**__USER IS IN APPEAL SERVER BUT NOT BANNED FROM MAIN__**`;
|
||||
} else if (member) embed.fields.push({
|
||||
name: '__Member Data__',
|
||||
value: `**Nickname:** ${member.nickname || 'N/A'}\n` +
|
||||
`**Server join date:** ${member.joinedAt.toDateString()}\n` +
|
||||
|
@ -81,7 +81,7 @@ class Modmail {
|
||||
if(!result) result = await this.bansServer.members.fetch(user).catch(() => {
|
||||
return null;
|
||||
});
|
||||
if (result) result.banned = true;
|
||||
if (result) result.inAppealServer = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -243,12 +243,15 @@ class Modmail {
|
||||
|
||||
const { member: staff, author } = message;
|
||||
|
||||
// Send to channel in server & target
|
||||
const sent = await this.send({ target: targetMember, staff, anon, content });
|
||||
if (sent.error) return sent;
|
||||
|
||||
// Inline response
|
||||
await message.channel.send('Delivered.').catch(this.client.logger.error.bind(this.client.logger));
|
||||
this.log({ author, action: `${author.tag} sent a message to ${targetMember.user.tag}`, content, target: targetMember.user });
|
||||
|
||||
// Send to channel in server
|
||||
return this.send({ target: targetMember, staff, anon, content });
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -280,7 +283,7 @@ class Modmail {
|
||||
icon_url: staff.user.displayAvatarURL({ dynamic: true })
|
||||
};
|
||||
|
||||
await this.channels.send(target, embed, { author: staff.id, content, timestamp: Date.now(), isReply: true, anon });
|
||||
return this.channels.send(target, embed, { author: staff.id, content, timestamp: Date.now(), isReply: true, anon });
|
||||
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ class Ping extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
execute() {
|
||||
async execute() {
|
||||
return `PONG!`;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user