if(!message.member.permissions.has("MANAGE_MESSAGES")&&!message.member.permissions.has("MANAGE_GUILD")){returnmessage.reply("You must be a server moderator (manage messages or manage server permissions) to use this command.");}
if(!mh||!Object.keys(mh.warnings).length){returnmessage.reply("There are no warnings available in this server.");}
if(!mh.warnings[user.id]||!mh.warnings[user.id].length){returnmessage.reply(`${user.id===message.author.id?'You have':'That user has'} never been warned in this server.`);}
//console.log(mh.cases, mh.warnings);
letws='';
letcwc=0;
letwarning;for(warningofmh.warnings[user.id]){
lettcase=mh.cases[warning-1];
if(tcase.status!=="Cleared"){
ws+=`\`Case #${warning}\` - Issued by <@${tcase.moderators[0]}>\n${tcase.reason}\n\n`;
}else{cwc++;}
}
if(cwc>0){ws+='*Plus '+cwc+' other warnings that have been cleared.*';}
if(cwc===mh.warnings[user.id].length){returnmessage.reply("That user has no uncleared warnings.");}