Skip to content

Commit

Permalink
Fix autocompleting reasons/comments if the field is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianVennen committed Jun 15, 2024
1 parent 3861787 commit c01608b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/user/UserCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default class UserCommand extends Command {
return false;
}

const moderator = await new MemberWrapper(interaction.user, interaction.guild).fetchMember();
const moderator = await new MemberWrapper(interaction.user, interaction.guild).fetchMember();
if (!await member.isModerateableBy(moderator)) {
await replyOrEdit(interaction, ErrorEmbed.message('You can\'t moderate this member!'));
return false;
Expand Down Expand Up @@ -186,7 +186,7 @@ export default class UserCommand extends Command {
'GROUP BY value ORDER BY count DESC LIMIT 5;',
interaction.user.id, interaction.guild.id, this.getName(), focussed.value, AUTOCOMPLETE_NAME_LIMIT);
if (focussed.value) {
options.unshift({reason: focussed.value});
options.unshift({value: focussed.value});
}
return options.map(data => ({name: data.value, value: data.value}));
}
Expand Down

0 comments on commit c01608b

Please sign in to comment.