Development (#112)
Co-authored-by: Samuel Shuert <samuel.shuert@gmail.com>
diff --git a/src/commands/mod/kick.ts b/src/commands/mod/kick.ts
index f9242fe..9ed4bb3 100644
--- a/src/commands/mod/kick.ts
+++ b/src/commands/mod/kick.ts
@@ -74,8 +74,9 @@
const config = await client.database.guilds.read(interaction.guild.id);
try {
if (notify) {
+ let formattedReason: string | null = null;
if (reason) {
- reason = reason
+ formattedReason = reason
.split("\n")
.map((line) => "> " + line)
.join("\n");
@@ -90,7 +91,7 @@
.setTitle("Kicked")
.setDescription(
`You have been kicked from ${interaction.guild.name}` +
- (reason ? ` for:\n${reason}` : ".\n*No reason was provided.*")
+ (formattedReason ? ` for:\n${formattedReason}` : ".\n*No reason was provided.*")
)
.setStatus("Danger")
],