feat(arabot): add dm for restrict reasons

This commit is contained in:
smyalygames 2023-03-01 23:41:20 +00:00
parent 50c823380c
commit bede3cadbe

View File

@ -235,6 +235,19 @@ export async function restrictRun(
info.message = `Restricted ${user}`; info.message = `Restricted ${user}`;
info.success = true; info.success = true;
// DM the reason
const dmEmbed = new EmbedBuilder()
.setColor('#FF6700')
.setAuthor({ name: 'You\'ve been restricted!', iconURL: `${user.displayAvatarURL()}` })
.addFields(
{ name: 'Reason', value: reason },
)
.setTimestamp();
await user.send({ embeds: [dmEmbed] })
.catch(() => {});
// Log the ban // Log the ban
let logChannel = guild.channels.cache let logChannel = guild.channels.cache
.get(IDs.channels.logs.restricted) as TextChannel | undefined; .get(IDs.channels.logs.restricted) as TextChannel | undefined;