Development (#112)
Co-authored-by: Samuel Shuert <samuel.shuert@gmail.com>
diff --git a/src/commands/mod/unmute.ts b/src/commands/mod/unmute.ts
index 516bd39..0200c22 100644
--- a/src/commands/mod/unmute.ts
+++ b/src/commands/mod/unmute.ts
@@ -57,6 +57,13 @@
let dmMessage;
try {
if (notify) {
+ let formattedReason: string | null = null;
+ if (reason) {
+ formattedReason = reason
+ .split("\n")
+ .map((line) => "> " + line)
+ .join("\n");
+ }
dmMessage = await (interaction.options.getMember("user") as GuildMember).send({
embeds: [
new EmojiEmbed()
@@ -64,7 +71,7 @@
.setTitle("Unmuted")
.setDescription(
`You have been unmuted in ${interaction.guild.name}` +
- (reason ? ` for:\n> ${reason}` : " with no reason provided.")
+ (formattedReason ? ` for:\n> ${formattedReason}` : " with no reason provided.")
)
.setStatus("Success")
]