mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
Corrected some docstrings (#1611)
* corrected some docstrings * merge master * fixed MessageSearchResult typedef and moved the note for the hit property to there
This commit is contained in:
@@ -406,7 +406,7 @@ class Guild {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch all webhooks for the guild.
|
* Fetch all webhooks for the guild.
|
||||||
* @returns {Collection<Snowflake, Webhook>}
|
* @returns {Promise<Collection<Snowflake, Webhook>>}
|
||||||
*/
|
*/
|
||||||
fetchWebhooks() {
|
fetchWebhooks() {
|
||||||
return this.client.api.guilds[this.id].webhooks.get().then(data => {
|
return this.client.api.guilds[this.id].webhooks.get().then(data => {
|
||||||
@@ -418,7 +418,7 @@ class Guild {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch available voice regions.
|
* Fetch available voice regions.
|
||||||
* @returns {Collection<string, VoiceRegion>}
|
* @returns {Promise<Collection<string, VoiceRegion>>}
|
||||||
*/
|
*/
|
||||||
fetchVoiceRegions() {
|
fetchVoiceRegions() {
|
||||||
return this.client.api.guilds[this.id].regions.get().then(res => {
|
return this.client.api.guilds[this.id].regions.get().then(res => {
|
||||||
@@ -539,8 +539,6 @@ class Guild {
|
|||||||
* <warn>This is only available when using a user account.</warn>
|
* <warn>This is only available when using a user account.</warn>
|
||||||
* @param {MessageSearchOptions} [options={}] Options to pass to the search
|
* @param {MessageSearchOptions} [options={}] Options to pass to the search
|
||||||
* @returns {Promise<MessageSearchResult>}
|
* @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
|
* @example
|
||||||
* guild.search({
|
* guild.search({
|
||||||
* content: 'discord.js',
|
* content: 'discord.js',
|
||||||
|
|||||||
@@ -203,8 +203,6 @@ class TextBasedChannel {
|
|||||||
* <warn>This is only available when using a user account.</warn>
|
* <warn>This is only available when using a user account.</warn>
|
||||||
* @param {MessageSearchOptions} [options={}] Options to pass to the search
|
* @param {MessageSearchOptions} [options={}] Options to pass to the search
|
||||||
* @returns {Promise<MessageSearchResult>}
|
* @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
|
* @example
|
||||||
* channel.search({
|
* channel.search({
|
||||||
* content: 'discord.js',
|
* content: 'discord.js',
|
||||||
|
|||||||
@@ -31,8 +31,9 @@ const { TypeError } = require('../../errors');
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} MessageSearchResult
|
* @typedef {Object} MessageSearchResult
|
||||||
* @type {number} total Total result count
|
* @property {number} total Total result count
|
||||||
* @type {Array<Message[]>} results Array of message results
|
* @property {Array<Message[]>} results Array of message results
|
||||||
|
* The message which has triggered the result will have the `hit` property set to `true`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = function search(target, options) {
|
module.exports = function search(target, options) {
|
||||||
|
|||||||
Reference in New Issue
Block a user