Skip to content

Commit

Permalink
Hide commands without description from autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Oct 3, 2022
1 parent a16e2e6 commit f605718
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/bots/src/discord/commands/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ export class MessageCommand implements DiscordTransformedCommand<MessageDto> {
await interaction.respond(
focusedValue.length !== 0
? Object.entries(this.messageData)
.filter(([_, data]) => data.description)
.map(([key, data]) => ({
name: data.description || key,
name: data.description,
value: key,
}))
.filter(
Expand Down

0 comments on commit f605718

Please sign in to comment.