/bridge: search substrings rather than startswith

This commit is contained in:
Cadence Ember 2024-09-02 00:15:00 +12:00
parent 1037fe0276
commit e0bb19bfab

View file

@ -70,7 +70,7 @@ async function interactAutocomplete({id, token, data, guild_id}) {
let rooms = await getCachedHierarchy(spaceID) let rooms = await getCachedHierarchy(spaceID)
// @ts-ignore // @ts-ignore
rooms = rooms.filter(r => r.name.startsWith(data.options[0].value)) rooms = rooms.filter(r => r.name.includes(data.options[0].value))
await discord.snow.interaction.createInteractionResponse(id, token, { await discord.snow.interaction.createInteractionResponse(id, token, {
type: DiscordTypes.InteractionResponseType.ApplicationCommandAutocompleteResult, type: DiscordTypes.InteractionResponseType.ApplicationCommandAutocompleteResult,