awaitinteraction.reply({embeds:[newclient.embed().setColor(client.config.embedColorGreen).setTitle('Case updated').setDescription(`Case #${caseId} has been successfully updated with new reason:\n\`${reason}\``)]});
}elseinteraction.reply({embeds:[newclient.embed().setColor(client.config.embedColorRed).setTitle('Case not updated').setDescription(`Case #${caseId} is not found in database, not updating the reason.`)]});
constembed=newclient.embed().setColor(client.config.embedColor).setTimestamp(Number(punishment.dataValues.time)).setTitle(`${punishment.dataValues.type[0].toUpperCase()+punishment.dataValues.type.slice(1)} | Case #${punishment.dataValues.case_id}`).addFields(
if(punishment.dataValues.expired)embed.addFields({name:'Expired',value:`This case has been overwritten by Case #${cancelledBy.dataValues.case_id} for reason \`${cancelledBy.dataValues.reason}\``})
if(punishment.dataValues.cancels)embed.addFields({name:'Overwrites',value:`This case overwrites Case #${cancels.dataValues.case_id} with reason \`${cancels.dataValues.reason}\``})
name:`${punishment.dataValues.type[0].toUpperCase()+punishment.dataValues.type.slice(1)} | Case #${punishment.dataValues.case_id}`,
value:`Reason: \`${punishment.dataValues.reason}\`\n${punishment.dataValues.duration?`Duration: ${Formatters.timeFormat(punishment.dataValues.duration,3)}\n`:''}Moderator: ${MessageTool.formatMention(punishment.dataValues.moderator,'user')}${punishment.dataValues.expired?`\nOverwritten by Case #${punishments.find(x=>x.dataValues.cancels===punishment.dataValues.case_id)?.case_id}`:''}${punishment.dataValues.cancels?`\nOverwrites Case #${punishment.dataValues.cancels}`:''}`
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))]});