mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-19 08:24:16 +02:00
feat(arabot): add dm for restrict reasons
This commit is contained in:
parent
50c823380c
commit
bede3cadbe
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user