Skip to content

Commit

Permalink
fix: set required reason when kicking
Browse files Browse the repository at this point in the history
  • Loading branch information
rdsov committed Jul 31, 2024
1 parent 291dcd4 commit 2e4fc68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions commands/kick.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ module.exports = {
.addStringOption((option) =>
option
.setName("reason")
.setDescription("The reason for kicking the user"),
.setDescription("The reason for kicking the user")
.setRequired(true),
),
async execute(interaction, config) {
const target = interaction.options.getUser("target");
Expand Down Expand Up @@ -59,7 +60,7 @@ module.exports = {
});
}

const reason = interaction.options.getString("reason") || "none provided.";
const reason = interaction.options.getString("reason");

// DM the user who was kicked with the reason
try {
Expand Down

0 comments on commit 2e4fc68

Please sign in to comment.