1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-12-27 04:15:38 -05:00

Add reply author in DM

This commit is contained in:
toast-ts 2023-12-25 23:21:15 +11:00
parent 9b10f6daba
commit 0cff16c168

View File

@ -129,7 +129,7 @@ export default class Developer {
const member = interaction.options.getMember('member');
const message = interaction.options.getString('message');
const int = await interaction.reply({content: '*Sending...*', fetchReply: true});
member.send(message).then(()=>int.edit(`Successfully sent a DM to **${member.user.username}** with the following message:\n\`\`\`${message}\`\`\``)).catch((e:Error)=>int.edit(`\`${e.message}\``))
member.send(`${message}\n╰ ${interaction.member.displayName}`).then(()=>int.edit(`Successfully sent a DM to **${member.user.username}** with the following message:\n\`\`\`${message}\`\`\``)).catch((e:Error)=>int.edit(`\`${e.message}\``))
}
} as any)[interaction.options.getSubcommand()]();
}