From ab6750d06df05f597484f18b5f837766a134d2b3 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Wed, 26 Oct 2016 21:37:19 -0400 Subject: [PATCH] Make docs catches use console.error --- src/client/WebhookClient.js | 2 +- src/client/voice/VoiceConnection.js | 4 ++-- src/structures/TextChannel.js | 2 +- src/structures/Webhook.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/WebhookClient.js b/src/client/WebhookClient.js index 6b2cbb12a..68a8a94d7 100644 --- a/src/client/WebhookClient.js +++ b/src/client/WebhookClient.js @@ -16,7 +16,7 @@ class WebhookClient extends Webhook { * @example * // create a new webhook and send a message * let hook = new Discord.WebhookClient('1234', 'abcdef') - * hook.sendMessage('This will send a message').catch(console.log) + * hook.sendMessage('This will send a message').catch(console.error) */ constructor(id, token, options) { super(null, id, token); diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 7490be89e..afb405789 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -212,7 +212,7 @@ class VoiceConnection extends EventEmitter { * .then(connection => { * const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3'); * }) - * .catch(console.log); + * .catch(console.error); */ playFile(file, options) { return this.playStream(fs.createReadStream(file), options); @@ -232,7 +232,7 @@ class VoiceConnection extends EventEmitter { * const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'}); * const dispatcher = connection.playStream(stream, streamOptions); * }) - * .catch(console.log); + * .catch(console.error); */ playStream(stream, { seek = 0, volume = 1, passes = 1 } = {}) { const options = { seek, volume, passes }; diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 8c0d8974a..4b69f91a6 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -58,7 +58,7 @@ class TextChannel extends GuildChannel { * @example * channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png') * .then(webhook => console.log(`Created Webhook ${webhook}`)) - * .catch(console.log) + * .catch(console.error) */ createWebhook(name, avatar) { return new Promise((resolve, reject) => { diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 0212bf33d..98f44447d 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -103,7 +103,7 @@ class Webhook { * 'footer': 'Powered by sneks', * 'ts': new Date().getTime() / 1000 * }] - * }).catch(console.log); + * }).catch(console.error); */ sendSlackMessage(body) { return this.client.rest.methods.sendSlackWebhookMessage(this, body);