mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Made search argument optional, added useronly warning and fixed endpoint (#1407)
This commit is contained in:
@@ -218,6 +218,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[]>>}
|
||||
* An array containing arrays of messages. Each inner array is a search context cluster.
|
||||
@@ -231,7 +232,7 @@ class TextBasedChannel {
|
||||
* console.log(`I found: **${hit}**, total results: ${res.totalResults}`);
|
||||
* }).catch(console.error);
|
||||
*/
|
||||
search(options) {
|
||||
search(options = {}) {
|
||||
return this.client.rest.methods.search(this, options);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user