mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
sanity changes to search (#1593)
* Create Search.js * Create Guild.js * Create TextBasedChannel.js * Create Search.js * Create Search.js * Create Guild.js * Create TextBasedChannel.js * Create Search.js
This commit is contained in:
@@ -203,7 +203,7 @@ class TextBasedChannel {
|
||||
* Performs a search within the channel.
|
||||
* <warn>This is only available when using a user account.</warn>
|
||||
* @param {MessageSearchOptions} [options={}] Options to pass to the search
|
||||
* @returns {Promise<Array<Message[]>>}
|
||||
* @returns {Promise<MessageSearchResult>}
|
||||
* An array containing arrays of messages. Each inner array is a search context cluster
|
||||
* The message which has triggered the result will have the `hit` property set to `true`
|
||||
* @example
|
||||
@@ -211,8 +211,8 @@ class TextBasedChannel {
|
||||
* content: 'discord.js',
|
||||
* before: '2016-11-17'
|
||||
* }).then(res => {
|
||||
* const hit = res.messages[0].find(m => m.hit).content;
|
||||
* console.log(`I found: **${hit}**, total results: ${res.totalResults}`);
|
||||
* const hit = res.results[0].find(m => m.hit).content;
|
||||
* console.log(`I found: **${hit}**, total results: ${res.total}`);
|
||||
* }).catch(console.error);
|
||||
*/
|
||||
search(options = {}) {
|
||||
|
||||
Reference in New Issue
Block a user