diff --git a/commands/moderation/ban.mjs b/commands/moderation/ban.mjs index e8852d2..230d0ea 100644 --- a/commands/moderation/ban.mjs +++ b/commands/moderation/ban.mjs @@ -92,5 +92,13 @@ export default { timestamp: Math.floor(new Date().getTime() / 1000), moderatorid: interaction.member.user.id, }); + try { + if (member) { + await member.send({ + content: "Vous avez reçu une sanction sur Art'Portal !", + embeds: [banEMBED], + }); + } + } catch (error) {} }, }; diff --git a/commands/moderation/kick.mjs b/commands/moderation/kick.mjs index 7b53fab..8729de5 100644 --- a/commands/moderation/kick.mjs +++ b/commands/moderation/kick.mjs @@ -97,5 +97,13 @@ export default { timestamp: Math.floor(new Date().getTime() / 1000), moderatorid: interaction.member.user.id, }); + try { + if (member) { + await member.send({ + content: "Vous avez reçu une sanction sur Art'Portal !", + embeds: [kickEMBED], + }); + } + } catch (error) {} }, }; diff --git a/commands/moderation/mute.mjs b/commands/moderation/mute.mjs index 343dfd2..4d90a83 100644 --- a/commands/moderation/mute.mjs +++ b/commands/moderation/mute.mjs @@ -100,5 +100,13 @@ export default { timestamp: Math.floor(new Date().getTime() / 1000), moderatorid: interaction.member.user.id, }); + try { + if (member) { + await member.send({ + content: "Vous avez reçu une sanction sur Art'Portal !", + embeds: [muteEMBED], + }); + } + } catch (error) {} }, }; diff --git a/interactions/modals/src/moderation/modmodal.mjs b/interactions/modals/src/moderation/modmodal.mjs index c769b73..2de9d41 100644 --- a/interactions/modals/src/moderation/modmodal.mjs +++ b/interactions/modals/src/moderation/modmodal.mjs @@ -9,6 +9,7 @@ export default { const user = await client.users.cache.get(userId); const member = await interaction.guild.members.cache.get(userId); let reason; + let dmEmbed; try { reason = interaction.fields.getTextInputValue("reason"); } catch {} @@ -74,6 +75,7 @@ export default { inline: true, }, ); + dmEmbed = banEMBED; await interaction.editReply({ embeds: [banEMBED], ephemeral: true, @@ -153,6 +155,7 @@ export default { inline: true, }, ); + dmEmbed = kickEMBED; await interaction.editReply({ embeds: [kickEMBED], ephemeral: true, @@ -236,6 +239,7 @@ export default { inline: true, }, ); + dmEmbed = muteEMBED; await interaction.editReply({ embeds: [muteEMBED], ephemeral: true, @@ -288,6 +292,7 @@ export default { inline: true, }, ); + dmEmbed = warnEMBED; await interaction.editReply({ embeds: [warnEMBED], ephemeral: true, @@ -344,5 +349,13 @@ export default { }); break; } + try { + if (member) { + await member.send({ + content: "Vous avez reçu une sanction sur Art'Portal !", + embeds: [dmEmbed], + }); + } + } catch (error) {} }, };