mirror of
https://github.com/Art-Portal/April.git
synced 2024-12-25 10:54:15 +01:00
Added DM on member sanction
This commit is contained in:
parent
dbfd521da9
commit
f1e831a1d6
@ -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) {}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -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) {}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -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) {}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -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) {}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user