File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
packages/harmonix/src/discord/handlers Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' harmonix ' : patch
3+ ---
4+
5+ Fix autocompletion handling command type
Original file line number Diff line number Diff line change 11import type { AutocompleteInteraction , Awaitable } from 'discord.js'
22
33import type { Harmonix } from '../../types/harmonix'
4- import type { HarmonixSlashCommand } from '../../types/module'
4+ import type { HarmonixSlashCommandWithOptions } from '../../types/module'
55
66export async function handleAutocompleteInteraction (
77 harmonix : Harmonix ,
88 interaction : AutocompleteInteraction
99) {
1010 const command = harmonix . commands . find (
11- ( cmd ) : cmd is HarmonixSlashCommand => cmd . name === interaction . commandName
11+ ( cmd ) : cmd is HarmonixSlashCommandWithOptions =>
12+ cmd . name === interaction . commandName && 'autocomplete' in cmd
1213 )
1314
1415 if ( ! command || ! command . autocomplete ) return
You can’t perform that action at this time.
0 commit comments