diff --git a/src/functions/algoliaResponse.ts b/src/functions/algoliaResponse.ts index 263a158..d10c016 100644 --- a/src/functions/algoliaResponse.ts +++ b/src/functions/algoliaResponse.ts @@ -22,6 +22,7 @@ export async function algoliaResponse( emojiName: string, user?: string, ephemeral?: boolean, + type = 'documentation', ): Promise { const full = `http://${algoliaAppId}.${API_BASE_ALGOLIA}/1/indexes/${algoliaIndex}/${encodeURIComponent( expandAlgoliaObjectId(algoliaObjectId), @@ -51,7 +52,7 @@ export async function algoliaResponse( prepareResponse(res, contentParts.join('\n'), { ephemeral, - suggestion: user ? { userId: user, kind: 'documentation' } : undefined, + suggestion: user ? { userId: user, kind: type } : undefined, }); } catch { prepareErrorResponse(res, 'Invalid result. Make sure to select an entry from the autocomplete.'); diff --git a/src/handling/handleApplicationCommand.ts b/src/handling/handleApplicationCommand.ts index 8c6639b..ea97f63 100644 --- a/src/handling/handleApplicationCommand.ts +++ b/src/handling/handleApplicationCommand.ts @@ -80,7 +80,6 @@ export async function handleApplicationCommand( case 'dtypes': { const castArgs = args as ArgumentsOf; - await algoliaResponse( res, process.env.DTYPES_ALGOLIA_APP!, @@ -108,6 +107,7 @@ export async function handleApplicationCommand( 'guide', castArgs.mention, castArgs.hide, + 'guide', ); break; }