Added DM on member sanction

This commit is contained in:
Ninjdai 2023-10-31 22:04:10 +01:00
parent dbfd521da9
commit f1e831a1d6
4 changed files with 37 additions and 0 deletions

View File

@ -92,5 +92,13 @@ export default {
timestamp: Math.floor(new Date().getTime() / 1000), timestamp: Math.floor(new Date().getTime() / 1000),
moderatorid: interaction.member.user.id, 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) {}
}, },
}; };

View File

@ -97,5 +97,13 @@ export default {
timestamp: Math.floor(new Date().getTime() / 1000), timestamp: Math.floor(new Date().getTime() / 1000),
moderatorid: interaction.member.user.id, 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) {}
}, },
}; };

View File

@ -100,5 +100,13 @@ export default {
timestamp: Math.floor(new Date().getTime() / 1000), timestamp: Math.floor(new Date().getTime() / 1000),
moderatorid: interaction.member.user.id, 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) {}
}, },
}; };

View File

@ -9,6 +9,7 @@ export default {
const user = await client.users.cache.get(userId); const user = await client.users.cache.get(userId);
const member = await interaction.guild.members.cache.get(userId); const member = await interaction.guild.members.cache.get(userId);
let reason; let reason;
let dmEmbed;
try { try {
reason = interaction.fields.getTextInputValue("reason"); reason = interaction.fields.getTextInputValue("reason");
} catch {} } catch {}
@ -74,6 +75,7 @@ export default {
inline: true, inline: true,
}, },
); );
dmEmbed = banEMBED;
await interaction.editReply({ await interaction.editReply({
embeds: [banEMBED], embeds: [banEMBED],
ephemeral: true, ephemeral: true,
@ -153,6 +155,7 @@ export default {
inline: true, inline: true,
}, },
); );
dmEmbed = kickEMBED;
await interaction.editReply({ await interaction.editReply({
embeds: [kickEMBED], embeds: [kickEMBED],
ephemeral: true, ephemeral: true,
@ -236,6 +239,7 @@ export default {
inline: true, inline: true,
}, },
); );
dmEmbed = muteEMBED;
await interaction.editReply({ await interaction.editReply({
embeds: [muteEMBED], embeds: [muteEMBED],
ephemeral: true, ephemeral: true,
@ -288,6 +292,7 @@ export default {
inline: true, inline: true,
}, },
); );
dmEmbed = warnEMBED;
await interaction.editReply({ await interaction.editReply({
embeds: [warnEMBED], embeds: [warnEMBED],
ephemeral: true, ephemeral: true,
@ -344,5 +349,13 @@ export default {
}); });
break; break;
} }
try {
if (member) {
await member.send({
content: "Vous avez reçu une sanction sur Art'Portal !",
embeds: [dmEmbed],
});
}
} catch (error) {}
}, },
}; };