File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,12 @@ export async function execute(interaction: ChatInputCommandInteraction) {
35
35
( match as MatchType ) ?? undefined
36
36
) ;
37
37
const response = results . length
38
- ? results . map ( ( { word, meaning } ) => `${ word } : ${ meaning } ` ) . join ( '\n' )
38
+ ? results
39
+ . map (
40
+ ( { word, meaning, extra, type } ) =>
41
+ `${ word } (${ type } ): ${ meaning } ${ extra ?. join ( ' ' ) ?? '' } `
42
+ )
43
+ . join ( '\n' )
39
44
: 'No results found.' ;
40
45
await interaction . editReply (
41
46
response . length > 2000
Original file line number Diff line number Diff line change
1
+ export interface Section {
2
+ title ?: string ;
3
+ type : WordType ;
4
+ headers : string [ ] ;
5
+ entries : Entry [ ] ;
6
+ }
7
+
1
8
/**
2
9
* The type of the entry in each separated file (i.e. verbs.json)
3
10
*/
4
11
export interface Entry {
5
12
word : string ;
6
13
meaning : string ;
14
+ extra ?: string [ ] ;
7
15
}
8
16
9
17
/**
You can’t perform that action at this time.
0 commit comments