From 2478092d44aac11c0a90cacbed1211af6cd4bdc6 Mon Sep 17 00:00:00 2001 From: Crawl Date: Sun, 20 Aug 2017 22:15:51 +0200 Subject: [PATCH] More docs cleanup --- src/client/voice/VoiceConnection.js | 2 +- src/structures/GroupDMChannel.js | 16 +++++++++------- src/structures/Guild.js | 2 +- src/structures/MessageMentions.js | 2 +- src/structures/User.js | 2 +- src/structures/Webhook.js | 2 +- src/util/Constants.js | 4 ++-- 7 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 8dc09e5b7..456e8d09f 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -165,7 +165,7 @@ class VoiceConnection extends EventEmitter { } /** - * Set the token and endpoint required to connect to the the voice servers. + * Set the token and endpoint required to connect to the voice servers. * @param {string} token The voice token * @param {string} endpoint The voice endpoint * @returns {void} diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index d7ee76b50..84ca62371 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -47,8 +47,8 @@ class GroupDMChannel extends Channel { this.name = data.name; /** - * A hash of the Group DM icon. - * @type {string} + * A hash of this Group DM icon + * @type {?string} */ this.icon = data.icon; @@ -70,11 +70,13 @@ class GroupDMChannel extends Channel { */ this.applicationID = data.application_id; - /** - * Nicknames for group members - * @type {?Collection} - */ - if (data.nicks) this.nicks = new Collection(data.nicks.map(n => [n.id, n.nick])); + if (data.nicks) { + /** + * Nicknames for group members + * @type {?Collection} + */ + this.nicks = new Collection(data.nicks.map(n => [n.id, n.nick])); + } if (!this.recipients) { /** diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 3946aa846..073c32383 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -18,7 +18,7 @@ const Snowflake = require('../util/Snowflake'); class Guild { constructor(client, data) { /** - * The client that created the instance of the the guild + * The client that created the instance of the guild * @name Guild#client * @type {Client} * @readonly diff --git a/src/structures/MessageMentions.js b/src/structures/MessageMentions.js index 0e8f6de83..99d45913b 100644 --- a/src/structures/MessageMentions.js +++ b/src/structures/MessageMentions.js @@ -102,7 +102,7 @@ class MessageMentions { /** * Any channels that were mentioned - * @type {?Collection} + * @type {Collection} * @readonly */ get channels() { diff --git a/src/structures/User.js b/src/structures/User.js index 4dbc0d84f..94344e4dd 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -10,7 +10,7 @@ const Snowflake = require('../util/Snowflake'); class User { constructor(client, data) { /** - * The client that created the instance of the the user + * The client that created the instance of the user * @name User#client * @type {} * @readonly diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 563e37200..de9a8e4c3 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -36,7 +36,7 @@ class Webhook { /** * The avatar for the webhook - * @type {string} + * @type {?string} */ this.avatar = data.avatar; diff --git a/src/util/Constants.js b/src/util/Constants.js index 132b90b98..08eb0091b 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -555,8 +555,8 @@ exports.UserSettingsMap = { explicit_content_filter: function explicitContentFilter(type) { // eslint-disable-line func-name-matching /** - * Safe direct messaging; force people's messages with images to be scanned before they are sent to you - * one of `DISABLED`, `NON_FRIENDS`, `FRIENDS_AND_NON_FRIENDS` + * Safe direct messaging; force people's messages with images to be scanned before they are sent to you. + * One of `DISABLED`, `NON_FRIENDS`, `FRIENDS_AND_NON_FRIENDS` * @name ClientUserSettings#explicitContentFilter * @type {string} */