You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gets documention for one element. Multiple properties/methods can be chained.
39
-
**Params**:
40
37
41
-
|name |type |required|
42
-
|:---------:|:----:|:------:|
43
-
|parent |string|yes |
44
-
|...children|string|no |
38
+
Gets documention for one element. Multiple properties/methods can be chained. **Params**:
39
+
40
+
| name | type | required |
41
+
| :---------: | :----: | :------: |
42
+
| parent | string | yes |
43
+
| ...children | string | no |
45
44
46
45
**Returns**: `DocElement?`
47
46
48
47
```js
49
-
doc.get('message')
50
-
doc.get('message', 'guild')
51
-
doc.get('message', 'guild', 'members')
48
+
doc.get('message');
49
+
doc.get('message', 'guild');
50
+
doc.get('message', 'guild', 'members');
52
51
```
53
52
54
53
### Doc#search(query)
54
+
55
55
Searches the documentation using fuzzy search for the given query and returns top 10 hits.
56
56
57
57
**Params**:
58
58
59
-
|name |type |required|
60
-
|:-----:|:----:|:------:|
61
-
|query |string|yes |
59
+
|name |type |required|
60
+
|:---: |:----:|:------:|
61
+
|query |string| yes|
62
62
63
63
**Returns**: `Array<DocElement>?`
64
64
65
65
### Doc#resolveEmbed(query)
66
-
Tries to resolve the query into a `DocElement` using `Doc#get`. The search terms are expected to be separated by `#` or `.`, example: `message#pin`. If an element cannot be resolved, falls back to `Doc#search`. The result is then formatted into an object representing a Discord embed which can be sent directly to a Discord channel.
66
+
67
+
Tries to resolve the query into a `DocElement` using `Doc#get`. The search terms are expected to be separated by `#` or
68
+
`.`, example: `message#pin`. If an element cannot be resolved, falls back to `Doc#search`. The result is then formatted
69
+
into an object representing a Discord embed which can be sent directly to a Discord channel.
67
70
68
71
**Params**:
69
72
70
-
|name |type |required|
71
-
|:-----:|:----:|:------:|
72
-
|query |string|yes |
73
+
|name |type |required|
74
+
|:---: |:----:|:------:|
75
+
|query |string| yes|
73
76
74
77
**Returns**: `object?`
75
78
76
79
### DocElement
80
+
77
81
#### Properties:
82
+
78
83
-`doc` - the Doc this element originates from;
79
-
-`docType` - the type of this documentation element. One of `class`, `event`, `interface`, `method`, `param`, `prop` and `typedef`;
84
+
-`docType` - the type of this documentation element. One of `class`, `event`, `interface`, `method`, `param`, `prop`
85
+
and `typedef`;
80
86
-`parent` - parent element if present;
81
87
-`name` - self-explanatory;
82
88
-`description` - self-explanatory;
@@ -87,11 +93,3 @@ Tries to resolve the query into a `DocElement` using `Doc#get`. The search terms
87
93
-`nullable` - tells whether this element can be null;
88
94
-`deprecated` - tells whether this element has been deprecated;
89
95
-`access` - access level for this element. Defaults to `public`;
0 commit comments