Skip to content

Commit 7adbdc4

Browse files
committed
Updated google search for definitions
1 parent ec84090 commit 7adbdc4

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/api/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,8 @@ export namespace RestResponsesRaw {
687687
header: null | string,
688688
image: null | string,
689689
sections: Array<{
690-
fields: Array<{name: string, value: null | string, values?: Array<string>}>,
690+
description: string,
691+
fields: Array<{name: string, title?: string, value: null | string, values?: Array<string>}>,
691692
title: string,
692693
}>,
693694
thumbnail: null | string,

src/utils/formatter/commands/search.google.web.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ export async function createMessage(
106106
if (section.fields.length) {
107107
const description: Array<string> = [];
108108
for (let field of section.fields) {
109-
description.push(`- ${field.name}`);
109+
if (field.title) {
110+
description.push(`- ${field.title}: ${field.name}`);
111+
} else {
112+
description.push(`- ${field.name}`);
113+
}
110114
if (field.value) {
111115
description.push(`-> ${Markup.italics(field.value)}`);
112116
}

0 commit comments

Comments
 (0)