add check for ban perm to view bans
This commit is contained in:
parent
5707493cfb
commit
3209216cff
@ -142,9 +142,11 @@ class ChannelHandler {
|
|||||||
color: guild.me.highestRoleColor
|
color: guild.me.highestRoleColor
|
||||||
};
|
};
|
||||||
if (member && member.inAppealServer) {
|
if (member && member.inAppealServer) {
|
||||||
const ban = await guild.fetchBan(member.id).catch(() => null);
|
if (guild.me.hasPermission('BAN_MEMBERS')) {
|
||||||
if (ban) embed.description = `**__USER IS BANNED FROM MAIN SERVER__**`;
|
const ban = await guild.fetchBan(member.id).catch(() => null);
|
||||||
else embed.description = `**__USER IS IN APPEAL SERVER BUT NOT BANNED FROM MAIN__**`;
|
if (ban) embed.description = `**__USER IS BANNED FROM MAIN SERVER__**`;
|
||||||
|
else embed.description = `**__USER IS IN APPEAL SERVER BUT NOT BANNED FROM MAIN__**`;
|
||||||
|
} else embed.description = `**__USER IS IN APPEAL SERVER__**`;
|
||||||
} else if (member) embed.fields.push({
|
} else if (member) embed.fields.push({
|
||||||
name: '__Member Data__',
|
name: '__Member Data__',
|
||||||
value: `**Nickname:** ${member.nickname || 'N/A'}\n` +
|
value: `**Nickname:** ${member.nickname || 'N/A'}\n` +
|
||||||
|
@ -251,8 +251,6 @@ class Modmail {
|
|||||||
await message.channel.send('Delivered.').catch(this.client.logger.error.bind(this.client.logger));
|
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 });
|
this.log({ author, action: `${author.tag} sent a message to ${targetMember.user.tag}`, content, target: targetMember.user });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async send({ target, staff, anon, content }) {
|
async send({ target, staff, anon, content }) {
|
||||||
|
Loading…
Reference in New Issue
Block a user