awaitinteraction.reply({embeds:[newclient.embed().setColor(client.config.embedColorGreen).setTitle('Case updated').setDescription(`Case #${caseId} has been successfully updated with new reason:\n\`${reason}\``)]})
constembed=newclient.embed().setColor(client.config.embedColor).setTimestamp(punishment.time).setTitle(`${punishment.type[0].toUpperCase()+punishment.type.slice(1)} | Case #${punishment.id}`).addFields(
if(punishment.expired)embed.addFields({name:'🔹 Expired',value:`This case has been overwritten by case #${cancelledBy.id} for reason \`${cancelledBy.reason}\``})
if(punishment.cancels)embed.addFields({name:'🔹 Overwrites',value:`This case overwrites case #${cancels.id} with reason \`${cancels.reason}\``})
interaction.reply({embeds:[embed]});
},
member: async()=>{
// if caseid is user id, show their punishment history sorted by most recent.
name:`${punishment.type[0].toUpperCase()+punishment.type.slice(1)} | Case #${punishment.id}`,
value:`Reason: \`${punishment.reason}\`\n${punishment.duration?`Duration: ${client.formatTime(punishment.duration,3)}\n`:''}Moderator: <@${punishment.moderator}>${punishment.expired?`\nOverwritten by Case #${punishments.find(x=>x.cancels===punishment._id)?._id}`:''}${punishment.cancels?`\nOverwrites case #${punishment.cancels}`:''}`
}
});
// if caseid is not a punishment nor a user, failed
if(!userPunishment||userPunishment.length==0)returninteraction.reply('No punishments found for that case # or User ID');
returninteraction.reply({embeds:[newclient.embed().setColor(client.config.embedColor).setTitle(`${user.username}'s punishment history`).setDescription(`**ID:** \`${user.id}\``).setFooter({text:`${userPunishment.length} total punishments. Viewing page ${pageNum} out of ${Math.ceil(userPunishment.length/6)}.`}).addFields(userPunishment.slice((pageNum-1)*6,pageNum*6))]});