diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index 063b192da..0a6eeec20 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -291,7 +291,7 @@ class ClientDataResolver { * [255, 0, 255] * ``` * for purple - * @typedef {String|number|Array} ColorResolvable + * @typedef {string|number|Array} ColorResolvable */ /** diff --git a/src/client/actions/GuildEmojiCreate.js b/src/client/actions/GuildEmojiCreate.js index 5df1ced3c..30c52ee24 100644 --- a/src/client/actions/GuildEmojiCreate.js +++ b/src/client/actions/GuildEmojiCreate.js @@ -15,4 +15,5 @@ class GuildEmojiCreateAction extends Action { * @event Client#emojiCreate * @param {Emoji} emoji The emoji that was created. */ + module.exports = GuildEmojiCreateAction; diff --git a/src/client/actions/GuildEmojiDelete.js b/src/client/actions/GuildEmojiDelete.js index 8cfa20591..eea5e0f4c 100644 --- a/src/client/actions/GuildEmojiDelete.js +++ b/src/client/actions/GuildEmojiDelete.js @@ -15,4 +15,5 @@ class GuildEmojiDeleteAction extends Action { * @event Client#emojiDelete * @param {Emoji} emoji The emoji that was deleted. */ + module.exports = GuildEmojiDeleteAction; diff --git a/src/client/actions/GuildEmojiUpdate.js b/src/client/actions/GuildEmojiUpdate.js index 593e54b2d..f129e1518 100644 --- a/src/client/actions/GuildEmojiUpdate.js +++ b/src/client/actions/GuildEmojiUpdate.js @@ -15,4 +15,5 @@ class GuildEmojiUpdateAction extends Action { * @param {Emoji} oldEmoji The old emoji * @param {Emoji} newEmoji The new emoji */ + module.exports = GuildEmojiUpdateAction; diff --git a/src/client/actions/MessageReactionAdd.js b/src/client/actions/MessageReactionAdd.js index f57ec2e27..d4a83f06a 100644 --- a/src/client/actions/MessageReactionAdd.js +++ b/src/client/actions/MessageReactionAdd.js @@ -34,10 +34,12 @@ class MessageReactionAdd extends Action { }; } } + /** * Emitted whenever a reaction is added to a message. * @event Client#messageReactionAdd * @param {MessageReaction} messageReaction The reaction object. * @param {User} user The user that applied the emoji or reaction emoji. */ + module.exports = MessageReactionAdd; diff --git a/src/client/actions/MessageReactionRemove.js b/src/client/actions/MessageReactionRemove.js index 98a958d15..c2367063c 100644 --- a/src/client/actions/MessageReactionRemove.js +++ b/src/client/actions/MessageReactionRemove.js @@ -34,10 +34,12 @@ class MessageReactionRemove extends Action { }; } } + /** * Emitted whenever a reaction is removed from a message. * @event Client#messageReactionRemove * @param {MessageReaction} messageReaction The reaction object. * @param {User} user The user that removed the emoji or reaction emoji. */ + module.exports = MessageReactionRemove; diff --git a/src/client/actions/MessageReactionRemoveAll.js b/src/client/actions/MessageReactionRemoveAll.js index dcc25cd7e..b64185eea 100644 --- a/src/client/actions/MessageReactionRemoveAll.js +++ b/src/client/actions/MessageReactionRemoveAll.js @@ -17,9 +17,11 @@ class MessageReactionRemoveAll extends Action { }; } } + /** * Emitted whenever all reactions are removed from a message. * @event Client#messageReactionRemoveAll * @param {Message} message The message the reactions were removed from. */ + module.exports = MessageReactionRemoveAll; diff --git a/src/client/voice/VoiceBroadcast.js b/src/client/voice/VoiceBroadcast.js index 1256d7cb8..42d815585 100644 --- a/src/client/voice/VoiceBroadcast.js +++ b/src/client/voice/VoiceBroadcast.js @@ -32,7 +32,7 @@ class VoiceBroadcast extends VolumeInterface { this.prism = new Prism(); /** * The current audio transcoder that is being used - * @type {object} + * @type {Object} */ this.currentTranscoder = null; this.tickInterval = null; @@ -120,14 +120,14 @@ class VoiceBroadcast extends VolumeInterface { * @param {StreamOptions} [options] Options for playing the stream * @returns {VoiceBroadcast} * @example - * // play streams using ytdl-core + * // Play streams using ytdl-core * const ytdl = require('ytdl-core'); * const streamOptions = { seek: 0, volume: 1 }; * const broadcast = client.createVoiceBroadcast(); * * voiceChannel.join() * .then(connection => { - * const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'}); + * const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', { filter : 'audioonly' }); * broadcast.playStream(stream); * const dispatcher = connection.playBroadcast(broadcast); * }) @@ -144,7 +144,7 @@ class VoiceBroadcast extends VolumeInterface { * @param {StreamOptions} [options] Options for playing the stream * @returns {StreamDispatcher} * @example - * // play files natively + * // Play files natively * const broadcast = client.createVoiceBroadcast(); * * voiceChannel.join() diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 60342ad68..e1a84d9ea 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -10,7 +10,7 @@ const Prism = require('prism-media'); /** * Represents a connection to a voice channel in Discord. * ```js - * // obtained using: + * // Obtained using: * voiceChannel.join().then(connection => { * * }); @@ -437,7 +437,7 @@ class VoiceConnection extends EventEmitter { * @param {StreamOptions} [options] Options for playing the stream * @returns {StreamDispatcher} * @example - * // play files natively + * // Play files natively * voiceChannel.join() * .then(connection => { * const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3'); @@ -464,12 +464,12 @@ class VoiceConnection extends EventEmitter { * @param {StreamOptions} [options] Options for playing the stream * @returns {StreamDispatcher} * @example - * // play streams using ytdl-core + * // Play streams using ytdl-core * const ytdl = require('ytdl-core'); * const streamOptions = { seek: 0, volume: 1 }; * voiceChannel.join() * .then(connection => { - * const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'}); + * const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', { filter : 'audioonly' }); * const dispatcher = connection.playStream(stream, streamOptions); * }) * .catch(console.error); @@ -504,7 +504,7 @@ class VoiceConnection extends EventEmitter { * @param {VoiceBroadcast} broadcast the broadcast to play * @returns {StreamDispatcher} * @example - * // play a broadcast + * // Play a broadcast * const broadcast = client * .createVoiceBroadcast() * .playFile('./test.mp3'); diff --git a/src/client/voice/VoiceUDPClient.js b/src/client/voice/VoiceUDPClient.js index c8b32f126..b3d538376 100644 --- a/src/client/voice/VoiceUDPClient.js +++ b/src/client/voice/VoiceUDPClient.js @@ -84,7 +84,7 @@ class VoiceConnectionUDPClient extends EventEmitter { /** * Send a packet to the UDP client - * @param {Object} packet the packet to send + * @param {Object} packet The packet to send * @returns {Promise} */ send(packet) { diff --git a/src/client/voice/VoiceWebSocket.js b/src/client/voice/VoiceWebSocket.js index 4edf11a7e..8709792cf 100644 --- a/src/client/voice/VoiceWebSocket.js +++ b/src/client/voice/VoiceWebSocket.js @@ -153,7 +153,7 @@ class VoiceWebSocket extends EventEmitter { /** * Called whenever an error occurs with the WebSocket. - * @param {Error} error the error that occurred + * @param {Error} error The error that occurred */ onError(error) { this.emit('error', error); @@ -161,7 +161,7 @@ class VoiceWebSocket extends EventEmitter { /** * Called whenever a valid packet is received from the WebSocket - * @param {Object} packet the received packet + * @param {Object} packet The received packet */ onPacket(packet) { switch (packet.op) { @@ -169,7 +169,7 @@ class VoiceWebSocket extends EventEmitter { this.setHeartbeat(packet.d.heartbeat_interval); /** * Emitted once the voice websocket receives the ready packet - * @param {Object} packet the received packet + * @param {Object} packet The received packet * @event VoiceWebSocket#ready */ this.emit('ready', packet.d); @@ -177,8 +177,8 @@ class VoiceWebSocket extends EventEmitter { case Constants.VoiceOPCodes.SESSION_DESCRIPTION: /** * Emitted once the Voice Websocket receives a description of this voice session - * @param {string} encryptionMode the type of encryption being used - * @param {SecretKey} secretKey the secret key used for encryption + * @param {string} encryptionMode The type of encryption being used + * @param {SecretKey} secretKey The secret key used for encryption * @event VoiceWebSocket#sessionDescription */ this.emit('sessionDescription', packet.d.mode, new SecretKey(packet.d.secret_key)); @@ -204,7 +204,7 @@ class VoiceWebSocket extends EventEmitter { /** * Sets an interval at which to send a heartbeat packet to the WebSocket - * @param {number} interval the interval at which to send a heartbeat packet + * @param {number} interval The interval at which to send a heartbeat packet */ setHeartbeat(interval) { if (!interval || isNaN(interval)) { @@ -214,7 +214,7 @@ class VoiceWebSocket extends EventEmitter { if (this.heartbeatInterval) { /** * Emitted whenver the voice websocket encounters a non-fatal error - * @param {string} warn the warning + * @param {string} warn The warning * @event VoiceWebSocket#warn */ this.emit('warn', 'A voice heartbeat interval is being overwritten'); diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 42d6efa8d..d98de7328 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -9,9 +9,9 @@ nonce.fill(0); /** * The class that sends voice packet data to the voice connection. * ```js - * // obtained using: + * // Obtained using: * voiceChannel.join().then(connection => { - * // you can play a file or a stream here: + * // You can play a file or a stream here: * const dispatcher = connection.playFile('./file.mp3'); * }); * ``` diff --git a/src/client/voice/receiver/VoiceReceiver.js b/src/client/voice/receiver/VoiceReceiver.js index 48e086fad..6f08da67b 100644 --- a/src/client/voice/receiver/VoiceReceiver.js +++ b/src/client/voice/receiver/VoiceReceiver.js @@ -9,7 +9,7 @@ nonce.fill(0); /** * Receives voice data from a voice connection. * ```js - * // obtained using: + * // Obtained using: * voiceChannel.join().then(connection => { * const receiver = connection.createReceiver(); * }); diff --git a/src/client/websocket/packets/handlers/Resumed.js b/src/client/websocket/packets/handlers/Resumed.js index d2fa68389..a4cfd716e 100644 --- a/src/client/websocket/packets/handlers/Resumed.js +++ b/src/client/websocket/packets/handlers/Resumed.js @@ -20,7 +20,7 @@ class ResumedHandler extends AbstractHandler { /** * Emitted whenever a websocket resumes * @event Client#resume - * @param {Number} replayed Number of events that were replayed + * @param {number} replayed Number of events that were replayed */ module.exports = ResumedHandler; diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index d080a2b06..15eea2c22 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -72,7 +72,7 @@ class GroupDMChannel extends Channel { /** * Nicknames for group members - * @type {?Collection} + * @type {?Collection} */ if (data.nicks) this.nicks = new Collection(data.nicks.map(n => [n.id, n.nick])); @@ -126,7 +126,7 @@ class GroupDMChannel extends Channel { /** * Add a user to the dm - * @param {UserResolvable|String} accessTokenOrID Access token or user resolvable + * @param {UserResolvable|string} accessTokenOrID Access token or user resolvable * @param {string} [nick] Permanent nickname to give the user (only available if a bot is creating the dm) */ diff --git a/src/structures/UserProfile.js b/src/structures/UserProfile.js index cae791d04..7abf8d2b5 100644 --- a/src/structures/UserProfile.js +++ b/src/structures/UserProfile.js @@ -28,7 +28,7 @@ class UserProfile { /** * The user's connections - * @type {Collection} + * @type {Collection} */ this.connections = new Collection();