add check for ban perm to view bans

This commit is contained in:
Erik 2021-07-19 22:20:14 +03:00
parent 5707493cfb
commit 3209216cff
No known key found for this signature in database
GPG Key ID: 7E862371D3409F16
2 changed files with 5 additions and 5 deletions

View File

@ -142,9 +142,11 @@ class ChannelHandler {
color: guild.me.highestRoleColor
};
if (member && member.inAppealServer) {
if (guild.me.hasPermission('BAN_MEMBERS')) {
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 embed.description = `**__USER IS IN APPEAL SERVER__**`;
} else if (member) embed.fields.push({
name: '__Member Data__',
value: `**Nickname:** ${member.nickname || 'N/A'}\n` +

View File

@ -251,8 +251,6 @@ class Modmail {
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 });
}
async send({ target, staff, anon, content }) {