mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
docs: consistency
This commit is contained in:
@@ -558,8 +558,8 @@ class GuildChannel extends Channel {
|
||||
* @example
|
||||
* // Delete the channel
|
||||
* channel.delete('making room for new channels')
|
||||
* .then() // Success
|
||||
* .catch(console.error); // Log error
|
||||
* .then(console.log)
|
||||
* .catch(console.error);
|
||||
*/
|
||||
delete(reason) {
|
||||
return this.client.api.channels(this.id).delete({ reason }).then(() => this);
|
||||
|
||||
@@ -125,8 +125,7 @@ class Webhook {
|
||||
* .then(console.log)
|
||||
* .catch(console.error);
|
||||
*/
|
||||
/* eslint-enable max-len */
|
||||
async send(content, options) { // eslint-disable-line complexity
|
||||
async send(content, options) {
|
||||
if (!options && typeof content === 'object' && !(content instanceof Array)) {
|
||||
options = content;
|
||||
content = null;
|
||||
|
||||
@@ -125,13 +125,12 @@ class TextBasedChannel {
|
||||
* @param {MessageSearchOptions} [options={}] Options to pass to the search
|
||||
* @returns {Promise<MessageSearchResult>}
|
||||
* @example
|
||||
* channel.search({
|
||||
* content: 'discord.js',
|
||||
* before: '2016-11-17'
|
||||
* }).then(res => {
|
||||
* const hit = res.results[0].find(m => m.hit).content;
|
||||
* console.log(`I found: **${hit}**, total results: ${res.total}`);
|
||||
* }).catch(console.error);
|
||||
* channel.search({ content: 'discord.js', before: '2016-11-17' })
|
||||
* .then(res => {
|
||||
* const hit = res.results[0].find(m => m.hit).content;
|
||||
* console.log(`I found: **${hit}**, total results: ${res.total}`);
|
||||
* })
|
||||
* .catch(console.error);
|
||||
*/
|
||||
search(options = {}) {
|
||||
return Shared.search(this, options);
|
||||
|
||||
Reference in New Issue
Block a user